JS to judge IE browser version too low sample code _javascript tips

Source: Internet
Author: User
A very simple example to determine whether IE browser version is too low
Example structure is as follows, in fact, a page with the introduction of jquery can be, by the way a standard structure (note that the IE6 and IE7 version of the lower case to see its cue effect)

Copy Code code as follows:

<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
<meta http-equiv= "Content-type" content= "text/html; charset=gb2312 "/>
<title> Check IE browser version is too low </title>
<script type= "Text/javascript" src= "Js/jquery.min.js" ></script>
<script type= "Text/javascript" >
* To determine if the browser version is too low * *
$ (document). Ready (function () {s
var b_name = navigator.appname;
var b_version = navigator.appversion;
var version = B_version.split (";");
var trim_version = version[1].replace (/[]/g, "");
if (B_name = = "Microsoft Internet Explorer") {
/* If it is IE6 or ie7*/
if (trim_version = = "MSIE7.0" | | | trim_version = = "MSIE6.0") {
Alert ("IE browser version is too low, please go to the designated website to download the relevant version");
Then skip to the download site where you want to connect
Window.location.href= "http://jiaoxueyun.com/download.jsp";
}
}
});
</script>
<body>
</body>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.