//根据地区修改 //华东地区:http://entry.qiye.163.com/domain/getverifycode.jsp //华北地区:http://entryhz.qiye.163.com/domain/getverifycode.jsp var verifyCodeUrl = "http://entryhz.qiye.163.com/domain/getverifycode.jsp"; var verifyCode = getQueryString("code"); function getId(id){ return document.getElementById(id); }; function getQueryString (e) { var t = new RegExp("(^|&)"+e+"=([^&]*)(&|$)","i"); var ps = window.location.search || window.location.hash; var n = ps.substr(1).match(t); if( n != null) { return unescape( n[2] ); }; return ""; }; function changeVerifyCode() { var url = verifyCodeUrl + "?_searchtime=" + new Date().getTime(); codeImgWrap.getElementsByTagName("img")[0].src = url; }; var msgMap ={ "input.account_name":"请输入登录帐号", "input.verifyCodeMsg":"请输入验证码", "input.codeError":"验证码错误", "input.email":"请输入完整的邮箱地址", "input.password":"请你输入密码", "input.noat":"请使用不包括@部分帐号登录", "input.account_name.en_US":"please enter your account", "input.verifyCodeMsg.en_US":"please input verification code", "input.codeError.en_US":"Verification code error", "input.email.en_US":"please enter your email address", "input.password.en_US":"please enter your password", "input.noat.en_US":"please enter your account without @", "input.account_name.zh_TW":"請輸入登錄帳號", "input.verifyCodeMsg.zh_TW":"请输入驗證碼", "input.codeError.zh_TW":"驗證碼錯誤", "input.email.zh_TW":"請輸入完整的郵箱地址", "input.password.zh_TW":"請你輸入密碼", "input.noat.zh_TW":"請使用不包括@部分的帐号登录" }; function getMsg(code){ var value = msgMap[code + ".zh_CN"]; if(!value){ value = msgMap[code]; } return value; }; function execOnLoad(){ var verifyCodeWrap = getId("verifyCodeWrap"); var codeImgWrap = getId("codeImgWrap"); var backz = getQueryString('msg') if(backz == 'ERR.PARAM' || backz == 'VERIFYCODE.REQ' || backz == 'VERIFYCODE.ERROR' || backz == 'ERR.PARAM'){ window.location.href="http://mail.btbu.edu.cn/"; }; if(verifyCode === "true"){ verifyCodeWrap.style.display ="block"; changeVerifyCode(); }; var verifyCodeInputEle = getId("verify_code"); // verifyCodeInputEle.onblur=function(){ // if(this.value==""){ // this.value=getMsg("input.verifyCodeMsg"); // this.className = "ipt-sample"; // } // }; }; if(window.attachEvent){ window.attachEvent("onload",execOnLoad); }else if(window.addEventListener){ window.addEventListener("load",execOnLoad,false); }else{ window.onload = execOnLoad; };