jQuery库无法正确加载

用户1050619

我将以下代码用于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] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章