clientInformation

clientInformation clientInformation *
*前のトピック: clientHeight
*次のトピック: clientLeft

clientInformation

解説

navigatorオブジェクトを返す。これによって、ブラウザの名前やバージョンを知ることができる。また、ある機能が使用可能になっているかどうかも知ることができる。

構文

object**.clientInformation**

次のJScriptの例は、ブラウザのユーザーエージェント名に"MSIE"が含まれているか調べている。もし、含まれていればブラウザはMicrosoft® Internet Explorerである。

if (window.clientInformation.userAgent.indexOf( "MSIE " ) > 0)
// is Microsoft Internet Explorer

次の例では、Java™ アプレットが動くかどうかを調べている。

if (window.clientInformation.javaEnabled() == true )
// Java is enabled, applets can run

適用

window

Up トップに戻る
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.