browserdetect.js
资源名称:MSP430.rar [点击查看]
上传用户:zhihaomold
上传日期:2007-04-17
资源大小:43041k
文件大小:1k
源码类别:
其他
开发平台:
Objective-C
- //nn4 dummy functions
- function draw_M( ){ return; }
- function pop_M(){ return; }
- function clear_M(){ return; }
- function browserDetect() {
- this.isNS4 = (document.layers)&&(navigator.appName=="Netscape")&&(parseInt(navigator.appVersion)==4) ? true : false;
- this.isIE4 = (document.all)&&(navigator.appName.indexOf("Microsoft") > -1)&&(parseInt(navigator.appVersion)==4) ? true : false;
- this.isIE5 = (document.getElementById)&&(navigator.appName.indexOf("Microsoft") > -1) ? true : false;
- this.isNS6 = (document.getElementById)&&(navigator.appName=="Netscape")&&(parseInt(navigator.appVersion)>4) ? true : false;
- this.isOP5 = (document.getElementById)&&(navigator.appName=="Opera")&&(parseInt(navigator.appVersion)>4) ? true : false;
- //os
- var agt=navigator.userAgent.toLowerCase();
- this.isMac = (agt.indexOf("mac")!=-1);
- }
- var nav = new browserDetect();
- //if (!nav.isNS4){
- // document.writeln('<script language="javascript" src="' + _MPath + 'headermenu.js" type="text/javascript"></script><script language="javascript1.2" src="' + _MPath + '/header/headerdata.js" type="text/javascript"></script>');
- //}