August 1999
Intermediate to advanced
1488 pages
72h 53m
English
navigator.userAgent
The userAgent property of the navigator object returns a string identifying the browser. This value is often sent to servers during HTTP data requests.
Listing 7.407 shows an example of how the userAgent property is used.
<html> <head> <title> Example of the userAgent property of the navigator object</title> </head> <body> <script language="JavaScript"> <!--Hide //Returns the userAgent property of the browser document.write(navigator.userAgent); // End Hide ---> </script> </body> </html> |
Read now
Unlock full access