jQuery datepicker() 未捕获的类型错误:未定义不是函数 [英] jQuery datepicker() Uncaught TypeError: undefined is not a function
问题描述
任何人都可以帮助我,过去几天我一直在努力解决这个问题.实际上我包含了所有必要的插件,但仍然是
Can anyone please help me I am struggling with this problem for the past few day. Actually I included all the necessary plugins' but still the
$('#datepicker').datepicker()
函数未定义错误.
我在我的项目的其他 jsp 中包含了相同的插件,日期选择器可以完美运行.
I included the same plugins' in the other jsp of my projects there the datepicker works perfectly.
这是我试过的.
<script src="http://code.jquery.com/jquery-1.10.2.js"></script>
<script src="http://code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css">
$( '#datepicker' ).datepicker();
它在页面加载本身时引发异常.谢谢.
It throws the exception on page load itself. Thanks.
推荐答案
如果两次包含同一个 js 文件两次是同一个文件的不同版本两次,请仔细检查您包含的 js 文件,会发生冲突.有耐心去整个jsp或html文件检查js文件.
Please double check the js files you include if you include the same js file twice are different version of same file twice, It will conflict. Have patient to go through to entire jsp or html file to check the js files.
这篇关于jQuery datepicker() 未捕获的类型错误:未定义不是函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!