最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

userAgent Property

Internet Development Index

Retrieves a string equivalent to the HTTP user-agent request header.

Syntax

[ sUserAgent = ] object.userAgent

Possible Values

sUserAgentString爐hat specifies a valid HTTP user agent.

The property is read-only. The property has no default value.

Remarks

The HTTP user-agent request header contains information about compatibility, the browser, and the platform name. For more information about the browser, see the appName property. For more information about the platform, see the appVersion property.

The userAgent property dynamically returns a different value depending on the browser and platform versions. For example, Microsoft® Internet Explorer 6 returns the following string for Microsoft Windows® XP.

Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)

Examples

This example uses the userAgent property to specify a required platform before additional script is executed. For example, if Windows XP is a requirement for the document, you can use a variable to determine whether the user is running the necessary operating system. The "bIsXP" variable is set to true if Windows XP is found in the userAgent value and the additional script is processed.

<SCRIPT>
var bIsXP=false;
window.onload=fnInit;
function fnInit(){
if(navigator.userAgent.indexOf("Windows NT 5.1")>-1){
bIsXP=true;
}
if(bIsXP==true){
// Process additional script.
}
}
</SCRIPT>

Standards Information

There is no public standard that applies to this property.

Applies To

clientInformation, navigator

See Also

About Conditional Comments
昌宁县| 雷州市| 永新县| 大渡口区| 合作市| 孟村| 龙门县| 上饶市| 隆德县| 江西省| 大理市| 九台市| 克山县| 会宁县| 长春市| 嵩明县| 揭东县| 乐业县| 麻栗坡县| 云安县| 乳山市| 登封市| 邓州市| 阜平县| 佳木斯市| 衡东县| 海南省| 哈密市| 宁蒗| 陇南市| 大足县| 武陟县| 宁陵县| 永州市| 磐安县| 密云县| 遵化市| 环江| 屯门区| 桃源县| 永康市|