alert() not working in Chrome

后端 未结 5 2251
南旧
南旧 2020-12-05 20:05

\"error\"

\'nuff said. I have absolutely no clue why using alert() there wouldn\'t work. It works perfectly in

5条回答
  •  孤城傲影
    2020-12-05 20:50

    Take a look at this thread: http://code.google.com/p/chromium/issues/detail?id=4158

    The problem is caused by javascript method "window.open(URL, windowName[, windowFeatures])". If the 3rd parameter windowFeatures is specified, then alert box doesn't work in the popup constrained window in Chrome, here is a simplified reduction:

    http://go/reductions/4158/test-home-constrained.html

    If the 3rd parameter windowFeatures is ignored, then alert box works in the popup in Chrome(the popup is actually opened as a new tab in Chrome), like this:

    http://go/reductions/4158/test-home-newtab.html

    it doesn't happen in IE7, Firefox3 or Safari3, it's a chrome specific issue.

    See also attachments for simplified reductions

提交回复
热议问题