开发者

Javascript:alert('...') - Error: uncaught exception: ReferenceError: alert is not defined [duplicate]

This question already has answers here: Closed 11 years ago.

Possible Duplicate:

JavaScript alert not working in Firefox 6

I often execute Javascript code in the address bar (mostly for debugging and testing): javascript:alert(some_function_with_interesting_return_val开发者_StackOverflow中文版ue('blah')); Or - more obvious: javascript:alert('interesting value');

This doesn't seem to work anymore with Firefox 6: Error: uncaught exception: ReferenceError: alert is not defined

How is it possible for alert() not to be defined ?

I've double-checked it with Firefox 5, Epiphany, Midori and Chromium - works fine.


I think it's maybe prevention, because a lot of sites abused this.

FYI, I'm probably going to split this bug into multiple, short and longer term fixes.

Short term: disallow pasting of javascript: URLs into the URL bar Longer term: additionally require that bookmarklets be "whitelisted" in the Bookmark Manager before it can run JavaScript

https://bugzilla.mozilla.org/show_bug.cgi?id=527530#c6

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜