this.OS = me.GetOSInfo(); //Operating system type this.IeVer = null; this.Bs_lang = (navigator.appName == 'Netscape'?navigator .language:navigator.browserLanguage);//Browser language version this.Bs_Name = me.GetBrowserName(); //Browser name
//Browser version if(this. Bs_Name=='IE') { var _msie = appVer.match(/MSIE d./i).toString(); this.Bs_Version = this.IeVer = _msie.replace(/MSIE (d)./i,"$1"); }else { this.Bs_Version = appVer; } this.Ie6 = this.IeVer==6 ? true: false; this.Ie7 = this.IeVer==7 ? true: false; this.Ie8 = this.IeVer==8 ? true: false; } //Client information var CMInfo = new ClientMentInfo(); //Cache background image under IE6 if(CMInfo.Ie6) { document.execCommand("BackgroundImageCache", false, true); } //Set all checkboxes to be selected or unchecked function setAllCheckbox(formName,objName,num) { if(formName) _arr = getObject(formName ).elements[objName]; else _arr = typeof(objName)=="object"?objName:document.all(objName); if(_arr) { if (num) { if (!_arr.length ) // There is only one checkbox, then length = undefined _arr.checked = true; else { for (var i=0; i<_arr.length; i ) { _arr[i].checked = true; } } }else { if (!_arr.length ) // There is only one checkbox, then length = undefined _arr.checked = false; else { for(var i=0; i<_arr. length; i ) { _arr[i].checked = false; } } } } }
//Make the current The page jumps to the specified page number function goPage(pageNum,pageStr) { window.location.href = "?np=" pageNum pageStr; } //Go respectively Spaces before and after the string, on the left and on the right String.prototype.trim = function(){ return this.replace(/^s |s $/g,"")} String.prototype.ltrim = function( ){ return this.replace(/^s /g,"")} String.prototype.rtrim = function(){ return this.replace(/s $/g,"")}
This article comes from the CSDN blog. Please indicate the source when reprinting: http://blog.csdn.net/linyuanxing/archive/2008/12/01/3421058.aspx
Pay attention to globalPara.js This author often uses some files of common variables and constants of each website. If you don’t need such files, you can put //JS for loading public variables loadjscssfile(JS_PATH "globalPara.js") ; Delete these two sentences, otherwise an error will be reported. (Updated on 2009-06-04) Changed the ClientMentInfo class to be compatible with IE6, IE7, IE8, Vista, Windows 7 and Firefox
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn