搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

Learn More

"javascript:window.close()" script doesnt work in firefox 3.6 and above It works in IE8 and used to work in earlier Firefox

  • 1 回覆
  • 308 有這個問題
  • 3 次檢視
  • 最近回覆由 cor-el

more options

I am using <a href="javascript:window.close()"> to close the window at the completion of an online survey. I works OK in IE and used to work in Firefox. Now the script does not do anything in 3.6 and above . In IE it closes a window through a GUI

I am using <a href="javascript:window.close()"> to close the window at the completion of an online survey. I works OK in IE and used to work in Firefox. Now the script does not do anything in 3.6 and above . In IE it closes a window through a GUI

所有回覆 (1)

more options

In Firefox you can only close a window that was previously opened via JavaScript

See :

https://developer.mozilla.org/En/DOM/window.close
https://developer.mozilla.org/En/DOM/window.open