我希望通过IE7-11,Chrome和Firefox的JavaScript检测各种具有功能检测功能的浏览器。我该怎么做>
答案 0 :(得分:0)
正如@dandavis所说,查看特定于您需要的浏览器的对象。例如:
if (!document.characterSet || !document.doctype || !document.defaultView) {
/**
* If the browser does not have these properties on the document,
* then it is probably IE8 or lower... Maybe.
*/
}