0

按照链接:

http://www.asp.net/ajaxlibrary/jquery_introduction.ashx

& 然后:

http://jquery.com/download/?rdfrom=http%3A%2F%2Fdocs.jquery.com%2Fmw%2Findex.php%3Ftitle%3DDownloading_jQuery%26redirect%3Dno

我在页面顶部包含了脚本文件:

<script type="text/javascript"  src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
<script type="text/javascript"  src="http://code.jquery.com/jquery-migrate-1.2.1.min.js"></script>

然后我包含了日期选择器的代码:

<input type="text" id="simple-date" /> 
<script type="text/javascript" language="javascript">
// the jQuery ready shortcut  
$(function () {  
    // set up our datepicker  
    $("#simple-date").datepicker();
});
</script>

但是当我单击文本字段时没有任何反应......是否应该加载日期选择器?请指教。。。谢谢

4

3 回答 3

2

You forgot to add the jquery-ui plugin on your document

<script src="http//ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script>

And have a look on themes too on the official site,I linked

Demo Fiddle

于 2013-07-29T09:33:11.243 回答
2

I think you missed the jquery ui inclusion.

<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
于 2013-07-29T09:33:41.753 回答
0

您应该添加两个 CSS:

<link href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" rel="Stylesheet" />

和 JSjQuery UI

<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
于 2013-07-29T09:35:16.407 回答