jquery给出了语法错误

时间:2015-09-20 05:35:24

标签: javascript jquery jsp

我收到以下错误

Uncaught SyntaxError: missing ) after argument list

对于我的jsp中的这个jquery,它使用一些strut标签转换为html,如下所示:

<script language="JavaScript" type="text/javascript">
    $(function (){
        var tbl = $("#table");      
        $("#addRowBtn").click(function(){
            $('<tr><td><arch:datePicker property="expirationDate" tabindex="${requestScope.tabIndex}" styleId="expirationDate" value="test" imageSrc="/image/content/calendar_icon.gif" alt="date picker"   onchange="validateDateFormat( this );" /></td></tr>').appendTo(tbl); }); });
</script>

解析以下html代码:

<script language="JavaScript" type="text/javascript">
    $(function (){
        var tbl = $("#table");      
        $("#addRowBtn").click(function(){
            $('<tr><td><input id="expirationDate" name="expirationDate" onchange="validateDateFormat( this );" class="sspdatepicker" type="text" alt="date picker State the date in numeric format of MonthMonthDayDayYearYearYearYear. Do not state dashes or slashes. For Example, January 1st 2013 should be stated as 01012013." value="test" maxlength="10"/><a aria-describedby="date" href="#" class="accCalendar datePicker" id="dateIconexpirationDate"><img src="/COMETSHDPortalApp/image/content/calendar_icon.gif" id="expirationDate" alt="date picker" class="sspdatepicker" title="expirationDate Calendar" tabindex="0"/></a><script type="text/javascript"> $A.bind(window, 'load', function(){ $A.setCalendar("UniqueCalendarIdexpirationDate", $A.getEl("dateIconexpirationDate"),$A.getEl("expirationDate"), false, function(ev, dc, targ){targ.value = dc.range[dc.range.current.month].nameShort + '/'    + dc.range.current.mDay + '/' + dc.range.current.year;dc.close(); targ.focus();},{className: 'calendar'});});</script></td></tr>').appendTo(tbl); }); });
</script>

感谢您的帮助

0 个答案:

没有答案