Home > Web Front-end > JS Tutorial > body text

js closes the browser window and checks the browser closing event_javascript skills

WBOY
Release: 2016-05-16 17:23:39
Original
1782 people have browsed it
js closes the browser window

js closes the browser window without popping up the prompt box. Supports ie6, Firefox, Google and other browsers.
Copy code The code is as follows:




logout< ;/a>



Firefox does not support js to close the browser window by default. You can change dom.allow_scripts_to_close_windows in about:config is true.

js checks the browser closing event

js checks the browser closing or refreshing event and actively pops up a prompt box. Supports ie6, Firefox, Google and other browsers.
Copy code The code is as follows:






source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!