我在 Visual Studio 2010 MVC4 razor microsoft 模板中。我从 jquery 站点下载了 jquery“工具包”,当我打开 index.html 时它可以工作。但是,当我将我的 razor 项目更改为看起来像 jquery 下载时(将所有 JS 文件、图像和 css 文件移动到正确的位置)并添加以下代码(适用于 html 案例)
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>jQuery UI Example Page</title>
<link type="text/css" href="~/Content/ui-lightness/jquery-ui-1.8.24.custom.css" rel="stylesheet" />
<script type="text/javascript" src="~/Scripts/jquery-1.8.2.min.js"></script>
<script type="text/javascript" src="~/Scripts/jquery-ui-1.8.24.custom.min.js"></script>
<script type="text/javascript">
$(function () {
// Datepicker
$('#datepicker').datepicker({
inline: true
});
});
</script>
</head>
<body>
<!-- Datepicker -->
<h2 class="demoHeaders">Datepicker</h2>
<div id="datepicker"></div>
</body>
对于文本 Datepicker,页面上没有显示任何内容。我已经查看了其他所有内容,但似乎没有任何效果。有什么建议么?