不知道哪里alert undefined 用下面的语句是js报错.F12能提示报错的地方window.alert=function(aa){ if (typeof (aa)"undefined"){ throw "就是这";}};
2017-10-31 17:40
543 查看
不知道哪里alert undefined 用下面的语句是js报错.F12能提示报错的地方
var oldalert=window.alert;
window.alert=function(aa){ if (typeof (aa)=="undefined"){ throw "就是这";}else{oldalert(aa)}};
这样浏览器会报错...就能定位到错误位置了.
var oldalert=window.alert;
window.alert=function(aa){ if (typeof (aa)=="undefined"){ throw "就是这";}else{oldalert(aa)}};
这样浏览器会报错...就能定位到错误位置了.
相关文章推荐
- "if (!(""a"" in window)) { var a = 1; } alert(a); 为什么结果是undefined"
- vue项目中Error in render function: "TypeError: Cannot read property 'matched' of undefined"
- vuejs路由使用的问题Error in render function: "TypeError: Cannot read property 'matched' of undefined"
- Undefined function 'max' for input arguments of type 'cell'.
- struts.xml中提示content of element type "package" must match
- 解决web.xml配置bug之提示The content of element type "web-app" must match "(icon?,display- name?
- Matlab出现On Startup: Error using eval undefined function 'workspacefunc' for input arguments of type
- Matlab出现On Startup: Error using eval undefined function 'workspacefunc' for input arguments of type
- VMware安装Ubuntu17.04的VMware-tools提示:what is the location of the "ifconfig" program on your machin问题解决
- Uncaught TypeErroe: Uncaught TypeError: Cannot call method 'push' of undefined 和 Uncaught TypeError: undefined is not a function
- matlab 出现Undefined function 'functionname' for input arguments of type 'logical'问题的解决办法
- 关于 "Uncaught TypeError: Property 'submit' of object #<HTMLFormElement> is not a function" 的解决方案
- [windpole]SPD 2010 无法打开MOSS 2010站点,提示“The content type of the response is "".The status code is "OK"”
- JsBridge "Uncaught TypeError: Cannot call method 'callHandler' of undefined", source
- Zend studio php内置函数没有自动补全或提示函数未定义"Call to undefined function "
- 类似app常见效果,弹出一个提示语句(黑色背景+白色文字),2s后消失(来自改编alert,在h5里比较实用的),下面附上效果图
- struts.xml错误提示:The content of element type "package" must match "(result-types?,interceptors?,defaul
- web.xml中提示错误The content of element type "web-app" must match
- [Vue warn]: Error in render: "TypeError: Cannot read property '0' of undefined、vuejs路由使用的问题Error in render function
- Undefined function 'im2double' for input arguments of type 'uint8'.