第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定

使用Navigator判斷IE的版本

<!DOCTYPE HTML>

<html>

<head>

<meta charset="UTF-8">

<title>使用Navigator判斷IE的版本Version</title>

</head>

<body>

<script>

document.write("瀏覽器代號為:"+navigator.appName);

document.write("<br />瀏覽器內(nèi)核為:"+navigator.appCodeName);

document.write("<br />瀏覽器版本為:"+navigator.appVersion);

document.write("<br />userAgent為:"+navigator.userAgent);

// 返回客戶機的瀏覽器信息

var ver=navigator.userAgent;

// 查找Trident(IE內(nèi)核)關(guān)鍵字判斷是否IE,注:IE6除外

var ieYes=ver.indexOf("Trident");

// 查找MSIE關(guān)鍵字

var vIE=ver.indexOf("MSIE");

// 獲取瀏覽器的名稱

var sAppName=navigator.appName;

// 提取關(guān)鍵字后面的3位版本號

var v=ver.substr(vIE+5,3);

var str="Internet Explorer "

// 是否IE內(nèi)核,這里指IE7-IE11

if(ieYes>-1){

// IE7---IE9的判斷

if(vIE>-1){

document.write("<br />瀏覽器為:"+str+v);

// IE10和IE11的區(qū)別是瀏覽器的名稱不同

}else if(sAppName=="Microsoft Internet Explorer"){

document.write("<br />瀏覽器為:"+str+"10.0");

// IE11為:"Netscape"

}else if(sAppName=="Netscape"){

document.write("<br />瀏覽器為:"+str+"11.0");

}

// 通過檢測MSIE關(guān)鍵字,判斷是否ie6

}else if(vIE>-1){

document.write("<br />瀏覽器為:"+str+v);

// 兩個關(guān)鍵字都沒有的肯定不是IE了

}else{

document.write("<br />不是IE瀏覽器!");

}

</script>

</body>

</html>


正在回答

1 回答

很有意思的對象

0 回復(fù) 有任何疑惑可以回復(fù)我~

舉報

0/150
提交
取消

使用Navigator判斷IE的版本

我要回答 關(guān)注問題
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號