似乎无法让jQuery UI Date Picker正常工作

时间:2016-02-16 22:35:52

标签: jquery jquery-ui

我正在尝试嵌入jQuery UI Date Picker。 我从这里得到了代码 - https://jqueryui.com/datepicker/

if-then-else

问题是我看不到实际的日期选择器,只有点击时才能看到输入框。我是否应该采取任何其他步骤才能使其正常工作或者我还有其他错误?

1 个答案:

答案 0 :(得分:1)

如果您看到控制台,您会看到类似这样的内容

  

文件:///Users/David/Developer/code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css   无法加载资源:net :: ERR_FILE_NOT_FOUND   file:///Users/David/Developer/code.jquery.com/jquery-1.10.2.js失败   加载资源:net :: ERR_FILE_NOT_FOUND   文件:///Users/David/Developer/code.jquery.com/ui/1.11.4/jquery-ui.js   无法加载资源:net :: ERR_FILE_NOT_FOUND

添加资源时只需添加http://即可

<link rel="stylesheet" href="http://code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
<script src="http://code.jquery.com/jquery-1.10.2.js"></script>
<script src="http://code.jquery.com/ui/1.11.4/jquery-ui.js"></script>