Home > Web Front-end > JS Tutorial > A relatively simple way to judge IE and FF under JAVASCRIPT_javascript skills

A relatively simple way to judge IE and FF under JAVASCRIPT_javascript skills

WBOY
Release: 2016-05-16 18:59:50
Original
910 people have browsed it

But the process is relatively complicated. When we only need a simple judgment method, we can do this:

Copy code The code is as follows:

<SCRIPT> <br>if (document.all){ //IE <br>window.dialogArguments.location.reload(); <br>}else{ //FIREFOX <br>opener.location.reload(); <br>} <br>window.close(); <br></SCRIPT>

document.all This attribute can be used under IE. It cannot be used under FF, so take advantage of this. You can execute corresponding programs for
different browsers.
Related labels:
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