jQuery datepicker()未捕获TypeError:undefined不是一个函数 [英] jQuery datepicker() Uncaught TypeError: undefined is not a function
问题描述
$('#datepicker')。datepicker()
功能未定义ERROR。
我在我的项目的其他jsp中包含相同的插件,datepicker工作完美。
是我试过的。
< 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 =stylesheethref =http://code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css>
$('#datepicker').datepicker();
它会在页面加载本身时引发异常。
谢谢。
请仔细检查你包含的js文件,如果你包含相同的js文件两次是不同的版本相同文件两次,会冲突。请耐心等待整个jsp或html文件检查js文件。
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()
function is not defined ERROR.
I included the same plugins' in the other jsp of my projects there the datepicker works perfectly.
This is what I tried.
<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.
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()未捕获TypeError:undefined不是一个函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!