所以,我正在使用一个非常简单的日期选择器。它在 Firefox 和 Chrome 中运行良好。但在 IE 中则不然。我对 jQuery 比较陌生,无法弄清楚这一点。 这是我的代码。我将其剥离,以便该页面上除了日期选择器之外什么都没有,但仍然不起作用。
<!DOCTYPE html>
<html>
<head>
<title>Testing</title>
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<link rel="stylesheet" href="//ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/themes/smoothness/jquery-ui.css" />
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js"></script>
<script>
$(document).ready(function() {
$('#txtDate').datepicker({
showAnim: 'slide',
dateFormat: 'mm-dd-yy',
});
});
</script>
<style>
body
{
font-family:Arial;
font-size : 10pt;
padding:5px;
}
</style>
</head>
<body>
<input type='text' id='txtDate'>
</body>
</html>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
最佳答案
显然,这是服务器问题。我使用了马克建议的链接中描述的方法。这在开发服务器上不起作用,所以为了确定,我在开发服务器上尝试了它,它确实有效。谢谢马克。
关于javascript - JQuery Datepicker 在 IE 中不工作,在 Firefox 和 Chrome 中工作正常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26716530/