源代碼
點擊運行
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>教程</title> </head> <body> <div id="example"></div> <script> txt = "<p>瀏覽器代號: " + navigator.appCodeName + "</p>"; txt+= "<p>瀏覽器名稱: " + navigator.appName + "</p>"; txt+= "<p>瀏覽器版本: " + navigator.appVersion + "</p>"; txt+= "<p>啟用Cookies: " + navigator.cookieEnabled + "</p>"; txt+= "<p>硬件平台: " + navigator.platform + "</p>"; txt+= "<p>用戶代理: " + navigator.userAgent + "</p>"; txt+= "<p>用戶代理語言: " + navigator.systemLanguage + "</p>"; document.getElementById("example").innerHTML=txt; </script> </body> </html>
運行結果