亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

JavaScript Window Navigator

Navigator Object

The JavaScript Navigator object contains relevant information about the browser.

Tip: Although there is no clear relevant standard for the Navigator object, all browsers support this object.

window.navigator object can be written without using the window prefix.

<div id="example"></div>
<script>
txt = "<p>Browser CodeName: " + navigator.appCodeName + "</p>";
txt+= "<p>Browser Name: " + navigator.appName + "</p>";
txt+= "<p>Browser Version: " + navigator.appVersion + "</p>";
txt+= "<p>Cookies Enabled: " + navigator.cookieEnabled + "</p>";
txt+= "<p>Platform: " + navigator.platform + "</p>";
txt+= "<p>User-agent header: " + navigator.userAgent + "</p>";
txt+= "<p>User-agent language: " + navigator.systemLanguage + "</p>";
document.getElementById("example").innerHTML=txt;
</script>

WARNING!!!

The information from the navigator object is misleading and should not be used to detect browser versions because:

navigator data can be Browser user changes

Some browsers will recognize errors for test sites

The browser cannot report new operating systems released later than the browser

Navigator object Methods

The Navigator object has the following two methods:

navigator.javaEnabled(): detects whether the browser has enabled java support and returns a Boolean value, true indicating support.

navigator.taintEnabled(): Detects whether the browser enables data tainting (data tainting), returns a Boolean value, true means enabled.


Continuing Learning
||
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>php中文網(php.cn)</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>
submitReset Code