我需要在我的項目中實現jQuery日期選擇器。這是我的腳本:jQuery日期選擇器在ASP.Net中無法正常工作MVC4
<script type="text/javascript">
$(document).ready(function() {
$("#datepicker").datepicker();
});
</script>
我說在我的HTML這些鏈接:
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.2/themes/smoothness/jquery-ui.css" />
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.2/jquery-ui.js"></script>
<label style="padding-left: 5px;">Date</label><input type="text" id="datepicker" />
但我不能讓下拉窗口與該代碼顯示。我怎麼解決這個問題? 當我看着頁面查看源代碼,也有類似的功能,一些額外的jQuery腳本:
<link href="../../Content/Site.css" rel="stylesheet" type="text/css" />
<link href="../../Content/themes/base/jquery-ui-1.9.2.css" rel="stylesheet" type="text/css" />
<link href="/Scripts/jtable/themes/standard/jtable_empty.css" rel="stylesheet" type="text/css" />
<link href="../../Content/application.css" rel="stylesheet" type="text/css" />
<script src="../../Scripts/jquery-1.8.3.js" type="text/javascript"></script>
<script src="/Scripts/jquery.unobtrusive-ajax.js" type="text/javascript"></script>
<script src="../../Scripts/jquery-ui-1.9.2.js" type="text/javascript"></script>
<script src="/Scripts/jtable/jquery.jtable.js" type="text/javascript"></script>
<script src="../../Scripts/knockout-2.1.0.js" type="text/javascript"></script>
<link href="/Scripts/jtable/themes/standard/jtable_empty.css" rel="stylesheet" type="text/css" />
<link href="/Content/themes/base/jquery-ui-1.9.2.css" rel="stylesheet" type="text/css" />
<script src="/Scripts/jtable/jquery.jtable.js" type="text/javascript"></script>
<script src="/Scripts/jquery.cookie.js" type="text/javascript"></script>
<script src="/Scripts/modernizr-1.7.min.js" type="text/javascript"></script>
<script src="/Scripts/knockout-2.2.0.js" type="text/javascript"></script>
<script src="/Scripts/advancedSearch/AdvancedSearch.js" type="text/javascript"></script>
<script src="/Scripts/advancedSearch/jquery.validationEngine.js" type="text/javascript"></script>
<script src="/Scripts/advancedSearch/jquery.validationEngine-en.js" type="text/javascript"></script>
<link href="/Scripts/advancedSearch/validationEngine.jquery.css" rel="stylesheet" type="text/css" />
你確定它呼籲所有必需的js? – NetStarter 2013-03-25 09:46:18
是的..我需要上述js的其他功能 – Niths 2013-03-25 09:48:19
好的問題可能是,其他jQuery和這個是互相沖突,你可以通過評論其他jQueries並運行這一個只有一段時間 – NetStarter 2013-03-25 09:50:48