close
function detectBrowser()//判斷是否用IE瀏覽器
{
var sAgent = navigator.userAgent.toLowerCase();
this.isIE = (sAgent.indexOf('msie')!=-1); //IE6.0-7
this.isFF = (sAgent.indexOf('firefox')!=-1);//firefox
this.isSa = (sAgent.indexOf('safari')!=-1);//safari
this.isOp = (sAgent.indexOf('opera')!=-1);//opera
this.isNN = (sAgent.indexOf('netscape')!=-1);//netscape
this.isMa = this.isIE;//marthon
this.isOther = (!this.isIE && !this.isFF && !this.isSa && !this.isOp && !this.isNN && !this.isSa);//unknown Browser
}
var oBrowser = new detectBrowser();
if (!oBrowser.isIE)
{
alert('注意!\n你正在使用的瀏覽器不被支援。請採用 Internet Explorer 瀏覽此網站。');
}
全站熱搜