<head>
<meta charset="utf-8" />
<title>@ViewBag.Title</title>
<link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" />
<script src="@Url.Content("~/Scripts/jquery-1.7.1.min.js")" type="text/javascript"></script>
<link rel="stylesheet" href="//code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css">
<script src="//code.jquery.com/jquery-1.9.1.js"></script>
<script src="//code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
<script>
$(function () { $("#datepicker").datepicker();});
</script>
这是我的Layout.cshtml
@Html.TextBoxFor(m => m.Date, new { @id = "datepicker", @style = "width:150px;" })
索引
但是无法显示日期选择器 它显示Log:13 Uncaught TypeError:$(...)。datepicker不是函数(匿名函数)@Log:13fire @jquery-1.9.1.js:1037self.fireWith @jquery-1.9.1.js:1148jQuery .extend.ready @jquery-1.9.1.js:433completed @ jquery-1.9.1.js:103在控制台中