火狐下正常,谷歌、360下js中提示Uncaught TypeError: XXX is not a function
2017-08-15 17:44
936 查看
在火狐浏览器下浏览正常,在谷歌和360中不能正常访问,提示Uncaught TypeError: XXX is not a function,网上查课很多资料,出现的原因也有很多,我出现的这一种情况是因为在文件没有加载完,就执行了js代码,所以要加上在html文件加载完后在执行js代码
比较常用的写法是
$(document).ready(function(){
//要执行的js代码段
});简单的写法是
比较常用的写法是
$(document).ready(function(){
//要执行的js代码段
});简单的写法是
$(function(){ //js代码 });加上这个后,发现提示没有了。
相关文章推荐
- js 函数报错“Uncaught: TypeError xxx is not a function”
- JS异常处理:Uncaught TypeError: xxx is not a function at HTMLAnchorElement.onclick
- 浏览器提示Uncaught TypeError: object is not a function XXX onclick
- Uncaught TypeError: XXX.getTime is not a function
- Uncaught TypeError: XXX is not a function解决
- Sea.js出现Uncaught TypeError: object is not a function的解决方法
- JS监听事件错误:Uncaught TypeError: xx(函数名)is not a function at HTMLInputElement.onclick
- jquery-ui.min.js:5 Uncaught TypeError: b.nodeName.toLowerCase is not a function
- Uncaught TypeError: window.showModalDialog is not a function 谷歌
- Uncaught TypeError: window.showModalDialog is not a function 谷歌
- 错误提示:Uncaught TypeError: xxxxx(此处为要调用的函数) is not a function
- Layui layer.open报错 layui.all.js:5 Uncaught TypeError: s.parents is not a function
- js错误Uncaught TypeError: $(...).datagrid is not a function自己写的并没有错但是一直报这个错(详解)
- window.showModalDialog 在谷歌Uncaught TypeError: undefined is not a function
- Sea.js出现Uncaught TypeError: object is not a function
- [dataTables.js error] Uncaught TypeError: myTable.row is not a function
- layer.js:2 Uncaught TypeError: n.on is not a function(…)
- jQuery 关于 Uncaught TypeError: XXX is not a function
- 【JQuery】sortable.js Uncaught TypeError $(...).sortable is not a function
- Uncaught TypeError: window.jsObj.closeWebView is not a function