내 웹 페이지에 jquery table add row plugin을 사용하고 Chrome 및 IE9의 로컬 데스크톱에서 정상적으로 작동합니다.IE9에서 Jquery가 작동하지 않습니다.
그러나 프로젝트를 서버에 업로드 할 때 여전히 Chrome에서 제대로 작동하지만 IE9에서는 아무런 변화가 없습니다 (추가 버튼이 있는데 클릭하면 행이 추가되지 않음).
이유가 궁금하십니까?
최신 jquery 버전을 사용합니다.
편집 :
오류가 "SCRIPT1028 : 식별자 문자열이나 숫자 xxxxx.aspx, 라인 257 문자 (21) 예상이"
<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>
, 난 그냥 가까운 브래킷
안녕하세요, Pita. 질문 할 때 항상 코드를 보여주십시오. –
코드 또는 일부 코드 샘플의 jsFiddle을 게시하십시오. 어쩌면 일어나는 페이지의 URL일까요? –
어떤 종류의 서버입니까? 브라우저에서 js 오류 메시지를 확인하십시오. 또한 작동하지 않는 기능이 ie9에서 지원되는지 확인하십시오. –