时间:2021-07-01 10:21:17 帮助过:22人阅读
提供一个js函数. 返回一个数组.
var match = rMsie.exec(ua);
if (match != null) {
return { browser : "ie", version : match[2] || "0" };
}
if (!!window.ActiveXObject || "ActiveXObject" in window){
return { browser : "ie", version : "0"};
}
var match = rFirefox.exec(ua);
if (match != null) {
return { browser : "firefox", version : match[2] || "0" };
}
var match = rOpera.exec(ua);
if (match != null) {
return { browser : "opera", version : match[2] || "0" };
}
var match = rChrome.exec(ua);
if (match != null) {
return { browser : "chrome", version : match[2] || "0" };
}
var match = rSafari.exec(ua);
if (match != null) {
return { browser : "safari", version : match[1] || "0" };
}
if (match != null) {
return { browser : "", version : "0" };
}
}
希望对大家有帮助.
编辑器修改的内容还有附件flash加载经常失败的问题修复, 回车问题处理.