var _____WB$wombat$assign$function_____ = function(name) {return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name)) || self[name]; }; if (!self.__WB_pmw) { self.__WB_pmw = function(obj) { this.__WB_source = obj; return this; } } { let window = _____WB$wombat$assign$function_____("window"); let self = _____WB$wombat$assign$function_____("self"); let document = _____WB$wombat$assign$function_____("document"); let location = _____WB$wombat$assign$function_____("location"); let top = _____WB$wombat$assign$function_____("top"); let parent = _____WB$wombat$assign$function_____("parent"); let frames = _____WB$wombat$assign$function_____("frames"); let opener = _____WB$wombat$assign$function_____("opener"); //取得当前页面URL var IEREQUEST = new Object() ; function ieRequest(strParam) { if(typeof IEREQUEST[strParam] != "undefined") { return IEREQUEST[strParam]; } var Params = document.location.search.substr(1).split('&') ; for (i=0 ; i < Params.length ; i++) { var Param = Params[i].split('=') ; if(Param.length>1) { IEREQUEST[Param[0]] = Param[1]; }else{ break; } } return IEREQUEST[strParam]; } function ieURLParam(strUrl,strParam) { var strReturn = ""; var Params = strUrl.substring(strUrl.indexOf("?")+1).split('&') ; for (i=0 ; i < Params.length ; i++) { var Param = Params[i].split('=') ; if(Param.length>1) { if(Param[0]==strParam) { strReturn = Param[1].trim(); return strReturn; } }else{ break; } } return strReturn; } //获取XmlHttpRequest对象并返回 function ieCreateXmlhttp() { var Xmlhttp = false; try { Xmlhttp = new ActiveXObject("MsXml2.XmlHTTP"); } catch (e) { try { Xmlhttp = new ActiveXObject("Microsoft.XmlHTTP"); } catch (e) { Xmlhttp = false; } } if (!Xmlhttp && typeof XMLHttpRequest != "undefined") { Xmlhttp = new XMLHttpRequest(); if (Xmlhttp.overrideMimeType) {//设置MiME类别 Xmlhttp.overrideMimeType("text/Xml"); } } return Xmlhttp; } //获取HtmlHttpRequest对象并返回 function ieCreateHtmlhttp() { var Xmlhttp = false; try { Xmlhttp = new ActiveXObject("MsXml2.XmlHTTP"); } catch (e) { try { Xmlhttp = new ActiveXObject("Microsoft.XmlHTTP"); } catch (e) { Xmlhttp = false; } } if (!Xmlhttp && typeof XMLHttpRequest != "undefined") { Xmlhttp = new XMLHttpRequest(); if (Xmlhttp.overrideMimeType) {//设置MiME类别 Xmlhttp.overrideMimeType("text/html"); } } return Xmlhttp; } function ieShowContent(element, url) { window.document.getElementById(element).innerHTML = "\u6b63\u5728\u52a0\u8f7d..."; var xmlHttp; xmlHttp = ieCreateXmlhttp(); xmlHttp.onreadystatechange = function () { if (xmlHttp.readyState == 4) { if (xmlHttp.status != "200") { window.document.getElementById(element).style.display = "none"; window.document.getElementById(element).innerHTML = "\u52a0\u8f7d\u5931\u8d25!"; } else { xml = xmlHttp.responseText; //空项检查 if ( xml.replace(/(^\s*)|(\s*$)/g, "") == ""){ window.document.getElementById(element).style.display = "none"; }else{ window.document.getElementById(element).style.display = ""; window.document.getElementById(element).innerHTML = xml; } } } }; xmlHttp.open("POST", url, true); xmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xmlHttp.send(""); } function ieGetContent(url) { var xmlHttp; xmlHttp = ieCreateHtmlhttp(); xmlHttp.onreadystatechange = function () { if (xmlHttp.readyState == 4) { if (xmlHttp.status != "200") { return "\u52a0\u8f7d\u5931\u8d25!"; } else { xml = xmlHttp.responseText; //空项检查 if ( xml.replace(/(^\s*)|(\s*$)/g, "") == ""){ return ""; }else{ return xml; } } } }; xmlHttp.open("POST", url, true); xmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xmlHttp.send(""); } function ieGetContent(element,url,callback) { var oldInnerHTML = window.document.getElementById(element).innerHTML; window.document.getElementById(element).innerHTML = "\u6b63\u5728\u52a0\u8f7d..."; var xmlHttp; xmlHttp = ieCreateHtmlhttp(); xmlHttp.onreadystatechange = function () { if (xmlHttp.readyState == 4) { if (xmlHttp.status != "200") { window.document.getElementById(element).style.display = "none"; window.document.getElementById(element).innerHTML = "\u52a0\u8f7d\u5931\u8d25!"; } else { xml = xmlHttp.responseText; //空项检查 if ( xml.replace(/(^\s*)|(\s*$)/g, "") == ""){ window.document.getElementById(element).style.display = "none"; }else{ window.document.getElementById(element).style.display = ""; window.document.getElementById(element).innerHTML = oldInnerHTML; callback(xml,element); } } } }; xmlHttp.open("POST", url, true); xmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xmlHttp.send(""); } function ieGetContent(element,url,info,callback) { if(info==undefined) { info = "\u6b63\u5728\u52a0\u8f7d..." } var oldInnerHTML = window.document.getElementById(element).innerHTML; window.document.getElementById(element).innerHTML = info; var xmlHttp; xmlHttp = ieCreateHtmlhttp(); xmlHttp.onreadystatechange = function () { if (xmlHttp.readyState == 4) { if (xmlHttp.status != "200") { window.document.getElementById(element).style.display = "none"; window.document.getElementById(element).innerHTML = "\u52a0\u8f7d\u5931\u8d25!"; } else { xml = xmlHttp.responseText; //空项检查 if ( xml.replace(/(^\s*)|(\s*$)/g, "") == ""){ window.document.getElementById(element).style.display = "none"; }else{ window.document.getElementById(element).style.display = ""; window.document.getElementById(element).innerHTML = oldInnerHTML; callback(xml,element); } } } }; xmlHttp.open("POST", url, true); xmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xmlHttp.send(""); } function ieSetContentByJson(element,url) { var oldInnerHTML = window.document.getElementById(element).innerHTML; window.document.getElementById(element).innerHTML = "\u6b63\u5728\u52a0\u8f7d..."; var xmlHttp; xmlHttp = ieCreateHtmlhttp(); xmlHttp.onreadystatechange = function () { if (xmlHttp.readyState == 4) { if (xmlHttp.status != "200") { window.document.getElementById(element).style.display = "none"; window.document.getElementById(element).innerHTML = "\u52a0\u8f7d\u5931\u8d25!"; } else { xml = xmlHttp.responseText; //空项检查 if ( xml.replace(/(^\s*)|(\s*$)/g, "") == ""){ window.document.getElementById(element).style.display = "none"; }else{ window.document.getElementById(element).style.display = ""; if(xml.indexOf("{")==0) { var oReturn = eval("("+xml+")"); try{ if(oReturn.status=="1") { window.document.getElementById(element).innerHTML = oReturn.message; }else{ window.document.getElementById(element).innerHTML = oldInnerHTML; } }catch(e) { window.document.getElementById(element).innerHTML = oldInnerHTML; } }else{ window.document.getElementById(element).innerHTML = oldInnerHTML; } } } } }; xmlHttp.open("POST", url, true); xmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xmlHttp.send(""); } function ieSetContent(element,url,info) { if(info==undefined) { info = "\u6b63\u5728\u52a0\u8f7d..." } var oldInnerHTML = window.document.getElementById(element).innerHTML; window.document.getElementById(element).innerHTML = info; var xmlHttp; xmlHttp = ieCreateHtmlhttp(); xmlHttp.onreadystatechange = function () { if (xmlHttp.readyState == 4) { if (xmlHttp.status != "200") { window.document.getElementById(element).style.display = "none"; window.document.getElementById(element).innerHTML = "\u52a0\u8f7d\u5931\u8d25!"; } else { xml = xmlHttp.responseText; //空项检查 if ( xml.replace(/(^\s*)|(\s*$)/g, "") == ""){ window.document.getElementById(element).style.display = "none"; }else{ window.document.getElementById(element).style.display = ""; window.document.getElementById(element).innerHTML = xml; } } } }; xmlHttp.open("POST", url, true); xmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xmlHttp.send(""); } // ------------------------- // JavaScript的Cookies函数库 // ------------------------- // 保存Cookie function saveCookie(name, value, expires, path, domain, secure){ var strCookie = name + "=" + value; if (expires){ // 计算Cookie的期限, 参数为天数 var curTime = new Date(); curTime.setTime(curTime.getTime() + expires*24*60*60*1000); strCookie += "; expires=" + curTime.toGMTString(); } // Cookie的路径 strCookie += (path) ? "; path=" + path : ""; // Cookie的Domain strCookie += (domain) ? "; domain=" + domain : ""; // 是否需要保密传送,为一个布尔值 strCookie += (secure) ? "; secure" : ""; document.cookie = strCookie; } // 使用名称参数取得Cookie值, null表示Cookie不存在 function getCookie(name){ var strCookies = document.cookie; var cookieName = name + "="; // Cookie名称 var valueBegin, valueEnd, value; // 寻找是否有此Cookie名称 valueBegin = strCookies.indexOf(cookieName); if (valueBegin == -1) return null; // 没有此Cookie // 取得值的结尾位置 valueEnd = strCookies.indexOf(";", valueBegin); if (valueEnd == -1) valueEnd = strCookies.length; // 最後一个Cookie // 取得Cookie值 value = strCookies.substring(valueBegin+cookieName.length,valueEnd); return value; } // 检查Cookie是否存在 function checkCookieExist(name){ if (getCookie(name)) return true; else return false; } // 删除Cookie function deleteCookie(name, path, domain){ var strCookie; // 检查Cookie是否存在 if (checkCookieExist(name)){ // 设置Cookie的期限为己过期 strCookie = name + "="; strCookie += (path) ? "; path=" + path : ""; strCookie += (domain) ? "; domain=" + domain : ""; strCookie += "; expires=Thu, 01-Jan-70 00:00:01 GMT"; document.cookie = strCookie; } } }