标签:
<!doctype html> <html> <head> <meta charset="utf-8"> <meta name="author"> <meta name="copyright"> <title>判断浏览器</title> <script> var browser = navigator.userAgent.toUpperCase(); if(browser.indexOf(‘CHROME‘) != -1){ console.log(‘chrome‘) }else if(browser.indexOf(‘FIREFOX‘) != -1){ console.log(‘Firefox‘) }else if(browser.indexOf(‘MSIE 7.0‘) != -1){ console.log(‘MSIE 7.0‘) } </script> </head> <body> </body> </html>
标签:
原文地址:http://www.cnblogs.com/heboliufengjie/p/4517603.html