前边 //pgeditorChar2.pgInitialize(); var lastUser = $.cookie("MLastLogin"); if (lastUser != "") { $("#uid").val(lastUser); } $("#loginBt").attr("disabled", false); $("#loginBt").css("cursor", "pointer"); $(":input").keydown( function(e) { var curKey = e.which; if (curKey == 13) { $("#loginBt").click(); return false; } }); $(".login_tab").find("span").click( function() { $("form").hide(); $("span").attr("class", ""); $(this).attr("class", "on"); $("#" + $(this).attr("formId")).show(); }); }); function display(id){ $("#"+id).addClass("current"); $("#"+id+"_con").css("display","block"); } function disappear(id){ $("#"+id).removeClass("current"); $("#"+id+"_con").css("display","none"); } function pwdTab(formId){ if($("#kjflag","#"+formId).attr("checked")){ $("#pwd_kl","#"+formId).css("display","none"); $("#pwd_kj","#"+formId).css("display",""); if("gform" == formId){ pgeditorChar.pgInitialize(); }else{ pgeditorChar2.pgInitialize(); } }else{ $("#pwd_kl","#"+formId).css("display",""); $("#pwd_kj","#"+formId).css("display","none"); } } function head_search() { var num = document.getElementById("snum").value; var url = document.getElementById("actionUrl").value; //如果用户没有输入查询条件,则在查询前清空文本框中的初始内容 search_check(document.getElementById("flag")); var flag = encodeURIComponent(encodeURIComponent($("#flag").val())); if(num == '0') { url = ""+url+"?flag="+flag; } if(num == '1') { url = ""+url+"?storename="+flag+"&grade=all"; } if(num == '2') { url = "http://www.l-zzz.com/plastic/price_datax.jsp?keyword="+flag.toUpperCase()+"&jsgjz=&snum=2&txtKeywords1=&phid="+flag.toUpperCase()+"&xhgetid=1"; } if(num == '3') { url = "http://www.l-zzz.com/xhinfo/serchxn1.jsp?keyword="+flag.toUpperCase()+"&jsgjz=&snum=3&txtKeywords1=&phid=&xhgetid=1&txtSign="+flag; } if(num == '4') { url = "/lineQuery.do?keyadd="+flag; } window.location.href = url; } function onclickimg() { var d = new Date().getTime(); document.getElementById("img_rand_code").src = "/authimg.img?aa=" + d; } function forgetPwd() { window.location.href = "/bsp/menber/findpwd/index.do"; } function doLogin(formId) { var oForm = $("#" + formId); var username = $("#uid").val(); var kl = $("#kl").val(); //var password = $("#pwd").val(); var gdkeyid = $("#randCode").val(); var type = $("#type").val(); var url = $("#url").val(); // 密码方式:1 常规密码登录,2 控件密码登录 var pwdTyp = "1"; if ("1" == type) { if ("" == username) { alert("请输入用户名!"); $("#uid").focus(); return false; } if(username.match("^[0-9a-zA-Z-_@]+$") == null){ alert("用户名格式不正确!"); return false; } if(pwdTyp == "1"){ if(kl == ""){ alert("请输入密码"); $("#kl","#"+formId).focus(); return false; } }else{ if(pgeditorChar.pwdLength()==0){ alert("请输入密码"); $("#_ocx_passwordChar").focus(); return false; } if(pgeditorChar.pwdValid()==1){ alert("密码不符合要求"); $("#_ocx_passwordChar").focus(); return false; } } if (gdkeyid == "") { alert("请输入验证码!"); $("#randCode").focus(); return false; } else { var result_string= ""; $.ajaxSetup({async : false}); $.post("/login/checkRand.do?jsoncallback=?",{"random":gdkeyid},function(result){ if("?(success)" != result){ result_string = "fail"; } },"text"); if(result_string=="fail"){ alert("验证码错误,请重试!"); $("#kl","#"+formId).val(""); $("#randCode").val(""); $("#kl","#"+formId).focus(); $.ajaxSetup({async : true}); return false; } } $("#rememberflag").val($("#checkbox").attr("checked") ? "1" : "0"); }else{ if ("" == username) { alert("请选择证书!"); return false; } if(pwdTyp == "1"){ if($().val("#kl") == ""){ alert("请输入密码"); $("#kl","#"+formId).focus(); return false; } }else{ if(pgeditorChar2.pwdLength()==0){ alert("请输入密码"); $("#_ocx_passwordChar2").focus(); return false; } if(pgeditorChar2.pwdValid()==1){ alert("密码不符合要求"); $("#_ocx_passwordChar2").focus(); return false; } } } if ("1" == type) { if(pwdTyp == "1"){ var kl = $("#kl").val(); $("#pwd").val(gScript.getPwdMd5(kl, "", "1")); }else{ var PwdResultChar = pgeditorChar.pwdResult();//获得密码密文 $("#pwd").val(PwdResultChar); } }else{ if(pwdTyp == "1"){ var kl = $("#kl").val(); $("#pwd").val(gScript.getPwdMd5(kl, "", "1")); }else{ var PwdResultChar2 = pgeditorChar2.pwdResult();//获得密码密文 $("#pwd").val(PwdResultChar2); } } $("#url").val(encodeURI(url)); $("#loginBt").attr("disabled", true).css("cursor", "default"); oForm.submit(); return false; } function checkForm(form) { var index = form.CertList.value; if (index == -1) { alert("没有找到证书,请申请安装证书!"); return false; } var signedData = signLogonData(arrayCerts[index], form.ToSign); if (signedData.length > 0) { form.SignedData.value = signedData; return true; } alert("证书验证签名失败!"); return false; } function selectCert(obj) { var index = $(obj).find("option:selected").val(); if (!index || -1 == index) { //无证书 return; } $("#IssuerDN").text(arrayCerts[index].Issuer); $("#CertDN").text(arrayCerts[index].Subject); $("#CertSerial").text(arrayCerts[index].SerialNumber); $("#CertValid").text( new Date(arrayCerts[index].ValidFrom).toLocaleString() + " 至 " + new Date(arrayCerts[index].ValidTo).toLocaleString()); // 证书+口令登录方式 LogonForm.uid.value = arrayCerts[index].CommonName; var subjectNames = new Names(arrayCerts[index].Subject); if (subjectNames.getItem("SN") != null) { LogonForm.uid.value = subjectNames.getItem("SN"); } else { LogonForm.uid.value = ""; } } function certView2(form) { if (arrayCerts.length > 0) { var index = document.all.CertList.value; arrayCerts[index].View(); } } function zc(){ window.location.href="/bsp/menber/reg/info.do"; }
您好,欢迎来到中国浙江网上技术市场! 登录 快速注册 帮助中心 客服电话: 0571-85009137

成果
  • 成果
  • 需求
  • 专家
  • 中介
搜索

欢迎登录网上技术平台