JavaScript Reference/Javascript Properties/userAgent

Материал из Web эксперт
Версия от 11:21, 26 мая 2010; Admin (обсуждение | вклад) (1 версия)
(разн.) ← Предыдущая | Текущая версия (разн.) | Следующая → (разн.)
Перейти к: навигация, поиск

"userAgent" Example

   <source lang="javascript">
   

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


     </source>
   
  


"userAgent" is applied to

   <source lang="javascript">

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

     </source>
   
  


"userAgent" Syntax and Note

   <source lang="javascript">

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

Syntax:

objectName.userAgent


     </source>