Webページでjquerytableadd rowプラグインを使用していますが、ChromeとIE9のローカルデスクトップで正常に機能します。
しかし、プロジェクトをサーバーにアップロードしたとき、Chromeでも正常に機能しますが、IE9では何も起こりませんでした(追加行ボタンがあり、クリックすると行が追加されませんでした)。
なぜこれが起こるのか分かりますか?
最新のjqueryバージョンを使用しています。
編集:
<table id="tblotherlicence" style="width:800px" cellspacing="2" cellpadding="3">
<tr><td class="formtitle" colspan="5">OTHER PROFESSIONAL LICENSURE<a style="font-size:7pt">(e.g.,registered psychiatric nurse; registered massage therapist; registered social worker)</a></td></tr>
<tr><td class="formlabel">Profession</td>
<td class="formlabel">Licence Number</td>
<td class="formlabel">Jurisdiction</td>
<td class="formlabel">Date of Expiry</td>
<td class="formlabel"><input class="addrow" type="button" value="Add Row" /></td></tr>
<tr>
<td><asp:TextBox ID="Licence1" runat="server"></asp:TextBox>
</td>
<td><asp:TextBox ID="LicenceNumber1" runat="server"></asp:TextBox>
</td>
<td><asp:TextBox ID="Jurisdiction1" runat="server"></asp:TextBox>
</td>
<td><asp:TextBox ID="ExpiryDate1" runat="server"></asp:TextBox></td>
<td><input class="delrow" type="button" value="Delete Row" /></td>
</tr>
</table>
<script type="text/javascript">
$(document).ready(function () {
$("#<%=ExpiryDate1.ClientID%>").datepicker({
yearRange: '1950:2015',
changeYear: true,
changeMonth: true,
257 });
$(".addrow").btnAddRow(function () {
var i;
var rowCount = $("#tblotherlicence tr").length;
for (i = 3; i <= rowCount; i++) {
$("#tblotherlicence tr:nth-child(" + i + ") td:nth-child(4) input[type='text']").attr("id", "MainPlaceHolder_RecordofNursing1_ExpiryDate" + (i - 2));
$("#tblotherlicence tr:nth-child(" + i + ") td:nth-child(4) input[type='text']").removeAttr("class");
$("#tblotherlicence tr:nth-child(" + i + ") td:nth-child(4) input[type='text']").datepicker({
yearRange: '1950:2015',
changeYear: true,
changeMonth: true,
});
}
});
$(".delrow").btnDelRow();
});
</script>
エラーは「SCRIPT1028:予期される識別子、文字列または数値xxxxx.aspx、257行目の文字21」です。257行目を角かっこで囲んでマークしました。