admin管理员组文章数量:1323715
If I have a regular javascript alert() in chrome browser 12.0.742.112 This should alert it, correct? I'm testing something is all browsers and I get the alert pop-up notification in everything but chrome.
Is there something I have to turn on?
edit...
Here is the code...
alert();
it is in a regular *.js file.
Javascript is not turned of because the javascript is working on the page.
If I have a regular javascript alert() in chrome browser 12.0.742.112 This should alert it, correct? I'm testing something is all browsers and I get the alert pop-up notification in everything but chrome.
Is there something I have to turn on?
edit...
Here is the code...
alert();
it is in a regular *.js file.
Javascript is not turned of because the javascript is working on the page.
Share Improve this question edited Jul 12, 2011 at 21:27 gravityboy asked Jul 12, 2011 at 21:20 gravityboygravityboy 8175 gold badges11 silver badges21 bronze badges 6- 7 Can you show some code? – Pekka Commented Jul 12, 2011 at 21:21
- alerts work fine in chrome. You're sure it's not something else? – user578895 Commented Jul 12, 2011 at 21:21
- 5 how did this question get 2 upvotes – slandau Commented Jul 12, 2011 at 21:26
- Code will probably be needed to answer this question properly. – seadowg Commented Jul 12, 2011 at 21:28
- Add some text in alert and it should work alert('test') – hungryMind Commented Jul 12, 2011 at 21:28
4 Answers
Reset to default 2There must be syntax error in script. Other browser (mostly IE) supports running script till code where error is reached, but chrome does not handle that way. try to see tools > JS console, if there is some error. Also some version of chrome does not support blank alert(), while other browser do.
If I understand you correctly then yes 'alert();' will pop up a window that reads 'undefined' in Chrome 12 (and I imagine other versions also).
The only thing I can think of without seeing some code is that you have javascript turned off in Chrome? Most likely there is an error else where in the Javascript that only appears in Chrome. Try using the developers console to see what happens when the alert should happen (the 'Console' tab of Chrome's developer tools shows js errors).
What is most likely happening is that you have a line of code that doesn't work in Chrome, causing it to throw an exception and never hit your alert.
In the latest Dev version of Chrome (14), alert()
should show undefined
.
What I found is that after the first alert() pop-up I must have clicked "[x] Don't show popus anymore for this website". And so it did.
So maybe reset that boolean setting somewhere?
本文标签: Javascript alert() in chromeStack Overflow
版权声明:本文标题:Javascript alert() in chrome - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742125554a2421923.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论