osh*_*nen 0 asp.net .net-1.1 jquery jquery-ui internet-explorer-8
为什么以下在IE8中给我一个错误?它适用于Chrome:
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.1/themes/smoothness/jquery-ui.css" />
<script src="http://code.jquery.com/jquery-1.10.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.1/jquery-ui.js"></script>
<script type="text/javascript" language="javascript">
$(document).ready(function() {
$("#txtDate").datepicker({
changeMonth: true,
changeYear: true,
yearRange: "+0:+1",
showButtonPanel: false,
dateFormat: "dd/mm/yy",
showOn: "button",
buttonImage: "../../images/Calendar.png",
buttonImageOnly: true
});
});
</script>
Run Code Online (Sandbox Code Playgroud)
所以在Chrome中绝对没有问题,但是IE8给了我以下错误:
Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; chromeframe/27.0.1453.110; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET CLR 1.0.3705; InfoPath.1; .NET4.0C; .NET4.0E)
Timestamp: Wed, 12 Jun 2013 15:18:48 UTC
Message: 'length' is null or not an object
Line: 139
Char: 17
Code: 0
URI: http://intranet/aspnet_client/system_web/1_1_4322/WebUIValidation.js
Run Code Online (Sandbox Code Playgroud)
datepicker仍然有效,当我点击图标弹出时,我可以选择一个日期,日期出现在文本框中.但是当我点击日期时,datepicker应该会消失,但它不会消失,而是显示上面的错误.
有任何想法吗?
显然是jQuery中的一个错误.我刚刚为jQuery datepicker的"onSelect"事件添加了一个do nothing事件处理程序,它运行正常.下面是修改后的jQuery代码:
$(document).ready(function () {
$("#txtDate").datepicker({
changeMonth: true,
changeYear: true,
yearRange: "+0:+1",
showButtonPanel: false,
dateFormat: "dd/mm/yy",
showOn: "button",
buttonImage: "../../images/Calendar.png",
buttonImageOnly: true,
onSelect: function () { }
});
});
Run Code Online (Sandbox Code Playgroud)
我也在IE 10中收到错误.如果有效,请告诉我.
| 归档时间: |
|
| 查看次数: |
7600 次 |
| 最近记录: |