最近有用到要判断IE版本的
<script type="text/javascript">
var IE= navigator.appName
var IE_ver = navigator.appVersion
var version = IE_ver _version.split(";");
var trim_Version = version[1].replace(/[ ]/g, "");
if (IE== "Microsoft Internet Explorer" && trim_Version == "MSIE10.0") {
alert("IE 10.0");
}
else if (IE== "Microsoft Internet Explorer" && trim_Version == "MSIE9.0") {
alert("IE 9.0");
}
</script>