📄 getbrowsertype.js
字号:
/***********************************************************************************
'***** Filename: Scripts/GetBrowserType.js *****
'***** Function: Gets Browser Type *****
'***** *****
'***** Copyright (c) 2000 Interactive Intelligence Inc (All Rights Reserved) *****
'**********************************************************************************/
function BrowserType()
{
this.isNetscape = false;
this.isIE = false;
this.isOther = false;
this.isNetscape4 = false;
this.isNetscape5 = false;
this.isIE4 = false;
this.isIE5 = false;
//determine which browser the user is using
if (parseInt(navigator.appVersion) >= 4)
{
if(navigator.appName == "Netscape")
{
this.isNetscape = true;
if (parseInt(navigator.appVersion) >=5)
this.isNetscape5 = true;
else
this.isNetscape4 = true;
}else if (navigator.appName == "Microsoft Internet Explorer"){
this.isIE = true;
if (navigator.appVersion >=5)
this.isIE5 = true;
else
this.isIE4 = true;
}else
this.isOther = true;
}
else
this.isOther = true;
this.isWin32 = false;
this.isWin16 = false;
this.isWinCE = false;
this.isMac = false;
this.isUnix = false;
//determine the platform the user is using
var a = navigator.userAgent;
if(a.indexOf("Windows 95") > 0 || a.indexOf("Win95") != -1 || a.indexOf("Win98") != -1 || a.indexOf("Windows 98") != -1 || a.indexOf("Windows NT") != -1)
this.isWin32 = true;
else if(a.indexOf("Windows 3.1") != -1 || a.indexOf("Win16") != -1)
this.isWin16 = true;
else if(a.indexOf("Windows CE") != -1)
this.isWinCE = true;
else if(a.indexOf("Mac") != -1)
this.isMac = true;
else if(a.indexOf("SunOS") != -1 || a.indexOf("HP-UX") != -1 || a.indexOf("X11") != -1)
this.isUnix = true;
}
var bt = new BrowserType();
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -