jQuery 关于 Uncaught TypeError: XXX is not a function
2017-06-12 00:00
761 查看
出现这样的错误是因为 button控件的 id 名和 函数名相同了,执行的时候先找到的是HTML控件,所以会报这样的错误,修改其中一个名称就OK了。
修改为
<label><span class="red">*</span> 短信验证</label> <input type="text" class="text" name="msgcode" onkeyup="msgcode();" /> <script> function msgcode() { var checode = $("[name = 'msgcode']").val(); if(checode) { return true; }else { return false; } } </script>
修改为
<label><span class="red">*</span> 短信验证</label> <input type="text" class="text" name="msgcode" onkeyup="msg();" /> <script> function msg() { var checode = $("[name = 'msgcode']").val(); if(checode) { return true; }else { return false; } } </script>
相关文章推荐
- 关于Jquery错误的解决:Uncaught TypeError: $.post is not a function
- 关于jquery使用live()方法的问题Uncaught TypeError: $(...).live is not a function
- Uncaught TypeError: $(...).Validform is not a function 如何解决,以及其他方式替换jquery功能
- jquery-ui.min.js:5 Uncaught TypeError: b.nodeName.toLowerCase is not a function
- 【JQuery】sortable.js Uncaught TypeError $(...).sortable is not a function
- Backbone 或 jQuery 出错,异常:Uncaught TypeError: object is not a function
- jquery.min.js:2 Uncaught TypeError: $(...).DataTable is not a function
- jquery提交表单报错 Uncaught TypeError: s[y] is not a function
- 关于Uncaught TypeError: type is not a function at HTMLAnchorElement.onclick (indexjsp:71)的解决
- 关于 "Uncaught TypeError: Property 'submit' of object #<HTMLFormElement> is not a function" 的解决方案
- jQuery 异常 Uncaught TypeError: url.indexOf is not a function
- 火狐下正常,谷歌、360下js中提示Uncaught TypeError: XXX is not a function
- 关于JavaScript一个错误 Uncaught TypeError: form.submit is not a function
- jquery.js里面报错Uncaught TypeError: a.indexOf is not a function
- js 函数报错“Uncaught: TypeError xxx is not a function”
- 浏览器提示Uncaught TypeError: object is not a function XXX onclick
- jquery中Uncaught TypeError: $(...).ajaxUpload is not a function(…)错误解决方法
- Uncaught TypeError: xxx.submit is not a function解决方案
- Uncaught TypeError: XXX.getTime is not a function
- Uncaught TypeError: XXX is not a function解决