function getIeVersion() {
var returnValue = 0;
var userAgent = window.navigator.userAgent;
if (/rv:11.0/.test(userAgent)) {
returnValue = 11;
}
else {
var matching = /MSIE \d+/.exec(userAgent);
try {
returnValue = parseInt(matching[0].substring(5));
}
catch (exception) {
}
}
return returnValue;
}
沒有留言:
張貼留言