开发者

Javascript alert() in chrome

开发者 https://www.devze.com 2023-03-20 01:27 出处:网络
If I have a regular javascript alert() in chrome browser 12.0.742.112 This should alert it, correct?

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.


There 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?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号