explorer version ie firefox chrome version
<html> <body> <script type="text/javascript"> var browser=navigator.appName var b_version=navigator.appVersion var version=parseFloat(b_version) document.write("Browser name: "+ browser) document.write("<br />") document.write("Browser version: "+ version) </script> </body> </html>
/*************************************************************************************/
<html> <head> <script type="text/javascript"> function detectBrowser() { var browser=navigator.appName var b_version=navigator.appVersion var version=parseFloat(b_version) if ((browser=="Netscape"||browser=="Microsoft Internet Explorer") && (version>=4)) {alert("Your browser is good enough!")} else {alert("It's time to upgrade your browser!")} } </script> </head> <body onload="detectBrowser()"> </body> </html>
沒有留言:
張貼留言