本地 jquery 日期选择器实现
Local jquery datepicker implementation
我正在尝试在 Web UI 中实现 JQuery 日期选择器的本地版本
(我使用 NuGet 下载脚本),
我开始使用 Visual Studios 2015 中的一个空项目,
我尝试执行以下操作:
<script type="text/javascript" src="jquery-1.4.4.js"></script>
<script type="text/javascript" src="jquery.ui.core.js"></script>
<script type="text/javascript" src="jquery.ui.datepicker.js"></script>
<script type="text/javascript">
$( function() {
$("#datepicker").datepicker({ dateFormat: 'dd-M-yy' });
});
</script>
但是没用。然而,当我使用网站上的链接时,它工作得很好
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
谁能告诉我哪里做错了,我该如何解决?
我对使用 Web 表单还很陌生,
提前致谢
我丢失了指向目录的链接,
感谢@Mark 的回复,
我在 src 中为所有这些添加了 ./,它起作用了
示例:
<script type="text/javascript" src="./jquery-1.4.4.js"></script>
我正在尝试在 Web UI 中实现 JQuery 日期选择器的本地版本 (我使用 NuGet 下载脚本),
我开始使用 Visual Studios 2015 中的一个空项目,
我尝试执行以下操作:
<script type="text/javascript" src="jquery-1.4.4.js"></script>
<script type="text/javascript" src="jquery.ui.core.js"></script>
<script type="text/javascript" src="jquery.ui.datepicker.js"></script>
<script type="text/javascript">
$( function() {
$("#datepicker").datepicker({ dateFormat: 'dd-M-yy' });
});
</script>
但是没用。然而,当我使用网站上的链接时,它工作得很好
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
谁能告诉我哪里做错了,我该如何解决?
我对使用 Web 表单还很陌生,
提前致谢
我丢失了指向目录的链接,
感谢@Mark 的回复,
我在 src 中为所有这些添加了 ./,它起作用了
示例:
<script type="text/javascript" src="./jquery-1.4.4.js"></script>