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 ) { for(var i=0; i<_arr.length; i ) 🎜> !_arr.length ) // There is only one checkbox, then length = undefined _arr.checked = false; _arr.length; i ) 🎜> } }
//Make the current page jump Go to the specified page number page function goPage(pageNum,pageStr) { window.location.href = "?np=" pageNum pageStr; } //Go to the strings respectively Before and after, left and right spaces 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,"")}
Pay attention to globalPara.js, which is a file of common variables and constants used by each website. If you don’t need such a file, 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