标签:on() tom user ted ret use ie版本 ring idt
如何用Javascript检测到所有的IE版本
function GetIEVersion() { var sAgent = window.navigator.userAgent; var Idx = sAgent.indexOf("MSIE"); ? // If IE, return version number. if (Idx > 0) return parseInt(sAgent.substring(Idx+ 5, sAgent.indexOf(".", Idx))); ? // If IE 11 then look for Updated user agent string. else if (!!navigator.userAgent.match(/Trident\/7\./)) return 11; ? else return 0; //It is not IE } ? if (GetIEVersion() > 0) alert("This is IE " + GetIEVersion()); else alert("This is not IE."); |
?
?
标签:on() tom user ted ret use ie版本 ring idt
原文地址:http://www.cnblogs.com/time-is-life/p/6612401.html