JavaScript Reference/Javascript Properties/userAgent

Материал из Web эксперт
Перейти к: навигация, поиск

"userAgent" Example

    
<html>
<body>
<button onclick="alert(navigator.userAgent);">User Agent</button>
</body>
</html>



"userAgent" is applied to

+----------------+--------------------------------------------------------------+
| Applied_To     |clientInformation               navigator                     |
+----------------+--------------------------------------------------------------+



"userAgent" Syntax and Note

Note:
Read-only property. 
Returns the name and version of the user agent, or browser.
    
Syntax:
    
objectName.userAgent