Javascript警报框在Chrome中不起作用 [英] Javascript Alert Boxes not working in Chrome
本文介绍了Javascript警报框在Chrome中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这很奇怪,下面这行javascript:
alert(test);
在chrome中给出以下错误:
未捕获的TypeError:对象[对象DOMWindow]的属性'alert'不是函数
它也是函数使用提示时会中断。奇怪的是它在Firefox中的作品。有任何想法吗?
解决方案
Chrome上是否安装了另一个弹出式窗口拦截器插件?如果你这样做,禁用/删除它,看看错误是否消失。
This is weird, The following line of javascript:
alert("test");
gives the following error in chrome:
Uncaught TypeError: Property 'alert' of object [object DOMWindow] is not a function
It also breaks when using a prompt. Oddly it works in firefox. Any ideas?
解决方案
Do you have a another pop up blocker plug-in installed on Chrome? If you do, disable/remove it and see if the error goes away.
这篇关于Javascript警报框在Chrome中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文