我将以下代码用于Jquery datepicker,但由于某些原因,在加载jquery资源时出现错误,并且未显示datepicker。
<html>
<head>
<link rel="stylesheet"
href="//ajax.googleapis.com/ajax/libs/jqueryui/1.11.1/themes/smoothness/jquery-ui.css" />
<script src="https://code.jquery.com/ui/1.11.0/jquery-ui.min.js"></script>
<script src="https://code.jquery.com/jquery-1.11.1.js"></script>
</head>
<script>
$(document).ready(function(){
$("#datepicker").datepicker();
});
</script>
<body>
<p>Date: <input type="text" id="datepicker"></p>
</body>
</html>
jquery-ui.min.js
取决于,jquery-1.11.1.js
因此jQuery
在此之后首先加载jQuery-UI
<script src="https://code.jquery.com/jquery-1.11.1.js"></script>
<script src="https://code.jquery.com/ui/1.11.0/jquery-ui.min.js"></script>
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句