找回密码

 

 

 

 

 

 

 


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

 

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=7" />
<meta name="Robots"   content="none"/>
<meta http-equiv="Expires" content="0"/>
<meta http-equiv="Cache-Control"  content="no-cache"/>
<meta http-equiv="pragma"  content="no-cache"/>
<title>找回密码</title>
<link  href="/otsweb/css/style.css" rel="stylesheet"  type="text/css"/>
<link  href="/otsweb/css/contact.css" rel="stylesheet"  type="text/css"/>
<link href="/otsweb/css/validation.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="/otsweb/css/easyui.css"/>
<link rel="stylesheet" type="text/css" href="/otsweb/css/suggest.css"/>
<link href="/otsweb/css/cupertino/jquery-ui-1.8.2.custom.css" rel="stylesheet" type="text/css" />
<link href="/otsweb/css/ots_common.css" rel="stylesheet" type="text/css" />
<link rel="shortcut icon" href="http://www.12306.cn/mormhweb/images/favicon.ico"/>
<script type="text/javascript" src="/otsweb/js/common/iepngfix_tilebg.js?version=2.3"></script>
<script src="/otsweb/js/common/jquery-1.4.2.min.js?version=2.3" type="text/javascript"></script>
<script src="/otsweb/js/common/autoHeight.js?version=2.3" type="text/javascript"></script>
<script src="/otsweb/js/common/jquery.bgiframe.min.js?version=2.3" type="text/javascript"></script>
<script src="/otsweb/js/common/jquery.easyui.min.js?version=2.3" type="text/javascript"></script>
<script src="/otsweb/js/common/datepicker/WdatePicker.js?version=2.3" type="text/javascript"></script>
<script src="/otsweb/js/common/j.suggest.js?version=2.3" type="text/javascript"></script>
<script src="/otsweb/js/common/school_suggest.js?version=2.3" type="text/javascript"></script>
<script src="/otsweb/js/common/city_name_suggest.js?version=2.3" type="text/javascript"></script>
<script src="/otsweb/js/common/trainCodeSuggest.js?version=2.3" type="text/javascript"></script>
<script src="/otsweb/js/common/date.js?version=2.3" type="text/javascript"></script>
<style>
       div,img,li,input,a { behavior: url("/otsweb/js/iepngfix.htc") }
</style>


<script>
   $(document).ready(function(){
    if(parent.notLogin==undefined) {
     parent.location='/otsweb' + '/main.jsp';
     return;
     }
         var isHide = "";
         if (isHide == "true") {
          if(parent.hideMenu){
           //parent.hideMenu();
       }
       } else {
        if(parent.showMenu){
         parent.showMenu();
     }
    }
    var clicktitle = '找回密码';
    if(parent.clickMenu&&clicktitle!==''){
     parent.clickMenu('找回密码');
       }

   
    var isLogin= false
    var u_name = '';
    if (isLogin) {
     parent.hasLogin(u_name);
         }else{
         parent.notLogin();
         }
  });
</script>
</head>
<body>
<link href="/otsweb/css/validation.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="/otsweb/js/common/jquery.tooltip.js?version=2.3"></script>
<script type="text/javascript" src="/otsweb/js/common/jquery.validate.min.js?version=2.3"></script>
<script type="text/javascript" src="/otsweb/js/common/formCheck.js?version=2.3" charset="UTF-8"></script>
<script type="text/javascript"><!--
$().ready(function() {
 // findPwdByEmailForm设置默认的属性check
 $("#findPwdByEmailForm").validate({
      rules: {
   'user.email': {
    required: true,
    email: true
   },
         'randCode':{
             required:true
   }
  },
  messages: {
   
   'user.email':{
    required: "请输入电子邮件地址!",
       email:"请输入有效的电子邮件地址!"
        },
         'randCode':{
             required:"请输入验证码!"
   }
  }
 });

 // findPwdByQuestionForm设置默认的属性check
 $("#findPwdByQuestionForm").validate({
      rules: {
     'retrieve_name': {
    required: true,
    byteRangeLength: [6,30],
    validateUsersName:true
   },
   'user.pwd_answer': {
    required: true
   },
   'user.password_new': {
    minlength: 6,
    required: true
   },
   confirmPassWord: {
    required: true,
    equalTo: "#passWordNew"
   },
         'randCode':{
             required:true
   }
  },
  messages: {
   
   'retrieve_name': {
    required: "请输入用户名!",
    byteRangeLength:"允许输入的字符串在6-30个字符之间!",
    validateUsersName:"用户名必须以字母开头,并且只能由字母、数字、下划线组成!"
   },
   'user.pwd_answer': {
    required: "密码提示答案!"
   },
   'user.password_new': {
    required: "请输入新密码!",
    minlength: "新密码长度不能少于6个字符!"
   },
   confirmPassWord: {
    required: "请输入确认密码!",
    minlength: "确认密码长度不能少于6个字符!",
    equalTo: "确认密码与新密码不同!"
   },
         'randCode':{
             required:"请输入验证码!"
   }
  },
  errorPlacement: function(error, element) {
   if ( element.is(":radio") )
    error.appendTo( element.parent().next() );
   else if ( element.is(":checkbox") )
    error.appendTo ( element.next() );
   else
    error.appendTo( element.parent().next() );
  }
 });

 
 $("#findEmailByNameAndID").validate({
     rules: {
  'loginUser.id_type_code': {
  required: true
  },
  'loginUser.id_no':{
   required: true,
   checkIdValidStr:true,
   isSecIDCard:"#cardType",
   isFirIDCard:"#cardType",
   checkHkongMacao:"#cardType",
   checkTaiw:"#cardType",
   checkPassport:"#cardType"
   },
     'loginUser.name':{
         required:true,
         byteRangeLength: [3,20],
         checkNameCharBlank:"cardType@cardCode"
     },
     'randCode':{
            required:true
  }
  },
  messages: {
   
   'loginUser.name':{
   required: "请输入您的姓名!",
   byteRangeLength:"允许输入的字符串在3-20个字符之间!",
   checkNameCharBlank:"姓名只能包含中文或者英文!"
   },
   'loginUser.id_type_code': {
    required: "请选择证件类型!"
   },
   'loginUser.id_no': {
    required: "请输入证件号码!",
    isSecIDCard:"请正确输入18位的身份证号!",
    isFirIDCard:"请正确输入15或者18位的身份证号!",
    checkIdValidStr:"输入的证件编号中包含中文信息或特殊字符!",
    checkHkongMacao:"请输入有效的港澳居民通行证号码!",
    checkTaiw:"请输入有效的台湾居民通行证号码!",
    checkPassport:"请输入有效的护照号码!"
   },
         'randCode':{
             required:"请输入验证码!"
   }
  },
  errorPlacement: function(error, element) {
   if ( element.is(":radio") )
    error.appendTo( element.parent().next() );
   else if ( element.is(":checkbox") )
    error.appendTo ( element.next() );
   else
    error.appendTo( element.parent().next() );
  }
  
 });


 $('#subDownLink').click(function(){
  var data = $('#passwordQuestion').val();
  if (data == null || data == "") {
   $("#pwdQuestion").html('');
   $("#passwordQuestion").val('');
   $("#pwdQuestion").html('请先提取密码提示问题!').addClass("red");
   return false;
  } else if (data == 'false') {
   return false;
  }
    });

   
 //$("#getPwdQuesButton").click(function(event){
 $("#getQuesionLink").click(function(event){
   if(jQuery.trim($("#userNameDown").val())!="" && $("#getQuesionLink").attr("class")=="pim_btn_a"){
   $.ajax(
    { // registAction  method=getUserByUname
     url :'registAction.do?method=getUserByUname',
     type :"POST",
     dataType :"json",
     data:{
                          username:$("#userNameDown").val()
      },
     success:function(data,textStatus){
       if (data == null) {
        $("#pwdQuestion").html('');
        $("#passwordQuestion").val('false');
        $("#pwdQuestion").html('用户名不存在或者注册时没有填写密码提示问题!很遗憾您不能通过该方式找回密码!').addClass("red");
       } else {
        $("#pwdQuestion").html('');
        $("#passwordQuestion").val('');
        $("#pwdQuestion").html(data.pwdQuestion).removeClass("red");
        $("#passwordQuestion").val(data.pwdQuestion);
       }
      },
     error:function(e){
       $("#pwdQuestion").html('');
       $("#passwordQuestion").val('');
     }
    });
    } else {
     $("#pwdQuestion").html('');
     $("#pwdQuestion").html('请输入用户名后再提取问题!').addClass("red");
      }
  });

  if ($("#passwordQuestion").val() != '') {
   $("#pwdQuestion").html($("#passwordQuestion").val());
  } else {
   $("#pwdQuestion").html('');
  }
  var  flag ='u';
  if (flag == 'u') {
   $("#userNameDown").val('');
  $("#pwdQuestion").html('');
  $("#passwordAnswer").val('');
  $("#randCodeDown").val('');
  $("#passWordNew").val('');
  $("#randCodeUp").val('');

  $("#name").val('');
  $("#cardCode").val('');
  $("#cardType").val('');
  $("#randCodeFindEmail").val('');
  $("#findEmail").val('');
  
  
  setDisableDown();
 } else {
  $("#userNameUp").val('');
  $("#email").val('');
  $("#randCodeUp").val('');
  
  $("#passwordAnswer").val('');
  $("#passWordNew").val('');
  $("#randCodeDown").val('');
  $("#confirmPassWord").val('');

  $("#name").val('');
  $("#cardCode").val('');
  $("#cardType").val('');
  $("#findEmail").val('');
  $("#randCodeFindEmail").val('');
  setDisableUp();
 }
});

function setDisableUp() {
 $("#radioDown").attr("checked", "checked");
 $("#radioUp").attr("checked", "");
 $("#radioDown").val('d');
 $("#userNameUp").attr("disabled",true);
 $("#email").attr("disabled",true);
 $("#randCodeUp").attr("disabled",true);

 $("#getQuesionLink").attr("onclick","");
 $("#getQuesionLink").attr("class","pim_btn_a");
 $("#subDownLink").attr("class","pim_btn_a");
 $("#subUpLink").attr("class","pim_btn_b");

 $("#userNameDown").attr("disabled",false);
 $("#passwordAnswer").attr("disabled",false);
 $("#passWordNew").attr("disabled",false);
 $("#confirmPassWord").attr("disabled",false);
 $("#randCodeDown").attr("disabled",false);

 $("#radioFindEmail").attr("checked", "");
 $("#name").attr("disabled",true);
 $("#cardType").attr("disabled",true);
 $("#cardCode").attr("disabled",true);
 $("#findEmail").attr("disabled",true);
 $("#subFindEmail").attr("disabled",true);
 $("#subFindEmail").attr("class","pim_btn_b");
 
}

function setDisableDown() {
 //   $("#test").attr("disabled",true);
 $("#radioUp").attr("checked", "checked");
 $("#radioDown").attr("checked", "");
 $("#radioUp").val('u');
 $("#userNameDown").attr("disabled",true);
 $("#passwordAnswer").attr("disabled",true);
 $("#passWordNew").attr("disabled",true);
 $("#confirmPassWord").attr("disabled",true);
 $("#randCodeDown").attr("disabled",true);
 $("#getPwdQuesButton").attr("disabled",true);

 $("#userNameUp").attr("disabled",false);
 $("#email").attr("disabled",false);
 $("#randCodeUp").attr("disabled",false);
 $("#submitUp").attr("disabled",false);
 
 $("#getQuesionLink").attr("class","pim_btn_b");
 $("#subDownLink").attr("class","pim_btn_b");
 $("#subUpLink").attr("class","pim_btn_a");

 $("#radioFindEmail").attr("checked", "");
 $("#name").attr("disabled",true);
 $("#cardType").attr("disabled",true);
 $("#cardCode").attr("disabled",true);
 $("#randCodeFindEmail").attr("disabled",true);
 $("#findEmail").attr("disabled",true);
 $("#subFindEmail").attr("disabled",true);
 $("#subFindEmail").attr("class","pim_btn_b");
 
}

function setDisable12() {
  //   $("#test").attr("disabled",true);
   $("#radioFindEmail").attr("checked", "checked");
  $("#radioUp").attr("checked", "");
  $("#radioDown").attr("checked", "");
  $("#radioFindEmail").val('findEmail');

  $("#userNameUp").attr("disabled",true);
  $("#email").attr("disabled",true);
  $("#randCodeUp").attr("disabled",true);

  $("#userNameDown").attr("disabled",true);
  $("#passwordAnswer").attr("disabled",true);
  $("#passWordNew").attr("disabled",true);
  $("#confirmPassWord").attr("disabled",true);
  $("#randCodeDown").attr("disabled",true);
  $("#getPwdQuesButton").attr("disabled",true);

  $("#subDownLink").attr("class","pim_btn_b");
  $("#subUpLink").attr("class","pim_btn_b");

  $("#name").attr("disabled",false);
  $("#cardType").attr("disabled",false);
  $("#cardCode").attr("disabled",false);
  $("#randCodeFindEmail").attr("disabled",false);
  $("#findEmail").attr("disabled",false);
  $("#subFindEmail").attr("disabled",false);
     $("#subFindEmail").attr("class","pim_btn_a");
  //$("#subFindEmail").attr("disabled",false);
  
 }

function subFormUp()
{
 if($("#subUpLink").attr("class")=="pim_btn_a"){
   var form = document.getElementById("findPwdByEmailForm");
   form.submit();
  }

}

function subFormDown()

 if($("#subDownLink").attr("class")=="pim_btn_a" && ($("#passWordNew").val()).length>5 && $("#confirmPassWord").val().length>5 && $("#passWordNew").val()==$("#confirmPassWord").val() ){
   var form = document.getElementById("findPwdByQuestionForm");
   form.submit();
 }
}

function subFormFindEmail()

 $("#errInfo").html("");
 $("#findEmail").val("");
 if($("#name").val()==""){
        alert("姓名不能为空!");
        return ;
  }
 if($("#cardCode").val()==""){
        alert("证件号码不能为空!");
        return ;
  }

 if($("#randCodeFindEmail").val()==""){
        alert("验证码不能为空!");
        return ;
  }

 if($("#subFindEmail").attr("class")=="pim_btn_a"){
  $.ajax({
   url : 'registAction.do?method=findEmailByNameAndID',
   type : "POST",
   dataType : "json",
   data:{name : $("#name").val(),
      cardType : $("#cardType").val(),
      cardCode : $("#cardCode").val(),
      randCode : $("#randCodeFindEmail").val()
    },
   success : function(data) {
      var email = data.email;
      var errMsg= data.errMsg;
      if(errMsg!=null && errMsg.length!=0){
       $("#errInfo").html(errMsg);
      
      }else{
       $("#findEmail").html(email);
      }
      refreshFindEmailImg();
    
   },
   error : function(e) {
    
   }
  });
    }
}

function refreshUpImg(){
 $("#randCodeImgUp").attr("src","passCodeAction.do?rand=randu"+'&'+Math.random());
}

function refreshDownImg(){
 $("#randCodeImgDown").attr("src","passCodeAction.do?rand=randd"+'&'+Math.random());
}

function refreshFindEmailImg(){
 $("#randCodeImgFindEmail").attr("src","passCodeAction.do?rand=rande"+'&'+Math.random());
}

--></script>
<div class="conWrap">
  <!--header -->

    <!--menu -->
   
    <!--menu end-->
  </div>
    <div class="text1">
      <!--right -->
      <div class="pim_rightnew">
        <div class="pim_title">
          <div class="pim_titlefont">找回用户名/密码</div>
        </div>
        <div class="pim_titlef3"><input name="radiobutton" type="radio" value="radiobutton" checked="checked" id="radioUp" onclick="setDisableDown();"/>根据电子邮件找回用户名/密码 <span> (* 为必填项)</span></div>
      
       <form name="registForm" id="findPwdByEmailForm" method="post" action="/otsweb/registAction.do?method=findPwdByMail"><div><input type="hidden" name="org.apache.struts.taglib.html.TOKEN" value="c203036f3135af21453c8d2800e38c01"></div>
        <table width="100%" border="0" cellspacing="0" cellpadding="0" class="pim_font">
          <tr>
   <td class="pim_ts" colspan="4">&nbsp;&nbsp;&nbsp;&nbsp;<label class="error" id="messageUp" style="display: none" ></label></td>
    </tr>
    <!-- 
          <tr>
            <td width="110" class="font_r">用户名: </td>
            <td width="230">
            <input type="text" name="loginUser.user_name" maxlength="50" value="" id="userNameUp" style="width:214px;" class="input_20txt">
            </td>
            <td class="pim_ts">
            <span>*</span> 必填,注册时的用户名
            </td>
          </tr>
          -->
          <tr>
            <td width="110" class="font_r">电子邮件:</td>
            <td width="230">
            <input type="text" name="user.email" maxlength="50" value="" id="email" style="width:214px;" class="input_20txt">
            </td>
            <td class="pim_ts"><span>*</span>  必填,注册时所填的电子邮箱。</td>
          </tr>
          <tr>
            <td class="font_r">验证码:</td>
            <td>
            <input type="text" name="randCode" maxlength="4" value="" id="randCodeUp" style="width:138px;" class="input_20txt">
            <img width="70" height="22" src="passCodeAction.do?rand=randu" onclick="this.src=this.src+'&'+Math.random();" title="单击刷新验证码" id="randCodeImgUp"></img>
           
            </td>
            <td class="pim_ts"><span>*</span>  必填,<a href="#" onclick="javascript:refreshUpImg();" style="color:#2c72ba">看不清,换一张</a></td>
          </tr>
          <tr>
            <td class="font_r">&nbsp;</td>
            <td>&nbsp;</td>
            <td class="pim_btn">
            <a href="#" class="pim_btn_a" onclick="subFormUp();" id="subUpLink" >
            <span><ins>提交</ins></span></a>
            </td>
            </td>
          </tr>
        </table>
        </form>
<script type="text/javascript" language="JavaScript">
  <!--
  var focusControl = document.forms["registForm"].elements["loginUser.user_name"];

  if (focusControl != null && focusControl.type != "hidden" && !focusControl.disabled && focusControl.style.display != "none") {
     focusControl.focus();
  }
  // -->
</script>

       
       
        <div class="pim_titlef3"><input name="radiobutton" type="radio" value="radiobutton" id="radioDown" onclick="setDisableUp();"/>根据密码提示问题和密码提示答案找回密码 <span> (* 为必填项)</span></div>
       
        <form name="registForm" id="findPwdByQuestionForm" method="post" action="/otsweb/registAction.do?method=findPwdByPwdAnswer"><div><input type="hidden" name="org.apache.struts.taglib.html.TOKEN" value="c203036f3135af21453c8d2800e38c01"></div>
        <table width="100%" border="2" cellspacing="0" cellpadding="0" class="pim_font">
        <!--
   <tr>
            <td class="font_r">&nbsp;</td>
            <td>&nbsp;</td>
            <td class="pim_btn">
            <a href="#" class="pim_btn_b" id="getQuesionLink2"><span><ins>提取问题</ins></span></a>
            </td>
          </tr>
         -->
          <tr>
   <td class="pim_ts" colspan="4">&nbsp;&nbsp;&nbsp;&nbsp;<label class="error" id="messageDown" style="display: none"></label></td>
   </tr>
    <tr>
            <td width="110" class="font_r">用户名: </td>
            <td width="230">
            <input type="text" name="retrieve_name" maxlength="50" value="" id="userNameDown" style="width:214px;" class="input_20txt">
            </td>
            <td class="pim_ts" colspan="1"><span>*</span>  必填,请输入您已经注册过的用户名。</td>
            <td class="pim_btn" width="150"><a href="#" class="pim_btn_a" id="getQuesionLink"><span><ins>提取问题</ins></span></a></td>
          </tr>
    <tr>
            <td width="110" class="font_r">密码提示问题:</td>
            <td width="230" colspan="3">
            <input type="hidden" name="user.pwd_question" value="" id="passwordQuestion" style="width:214px;" class="input_20txthui">
            <div id="pwdQuestion" style="width:214px;"></div>
            </td>
          </tr>
    <tr>
            <td width="110" class="font_r">密码提示答案:</td>
            <td width="230">
            <input type="text" name="user.pwd_answer" maxlength="50" value="" id="passwordAnswer" style="width:214px;" class="input_20txt">
            </td>
            <td class="pim_ts" colspan="2"><span>*</span> 必填,请正确输入密码提示答案。<span></span></td>
          </tr>
          <tr>
            <td width="110" class="font_r">新密码: </td>
            <td width="230">
             <input type="password" name="user.password_new" maxlength="50" value="" id="passWordNew" style="width:214px;" class="input_20txt">
            </td>
            <td class="pim_ts" colspan="2"><span>*</span> 必填,新密码要求不少于6位字符。(推荐设置安全性高的密码)。</td>
          </tr>
          <tr>
            <td class="font_r">密码确认:</td>
            <td>
             <input type="password" name="confirmPassWord" maxlength="50" value="" id="confirmPassWord" style="width:214px;" class="input_20txt">
            </td>
            <td class="pim_ts" colspan="2"><span>*</span>  必填,请再次输入密码。</td>
          </tr>
          <tr>
            <td class="font_r">验证码:</td>
            <td>
            <input type="text" name="randCode" maxlength="4" value="" id="randCodeDown" style="width:138px;" class="input_20txt">
            <img border=0 src="passCodeAction.do?rand=randd" width="70" height="22" onclick="this.src=this.src+'&'+Math.random();" title="单击刷新验证码" id="randCodeImgDown">
            </td>
            <td class="pim_ts" colspan="1"><span>*</span>  必填,<a href="#" onclick="javascript:refreshDownImg();" style="color:#2c72ba">看不清,换一张</a></td>
          </tr>
          <tr>
            <td class="font_r">&nbsp;</td>
            <td colspan="2">&nbsp;</td>
            <td class="pim_btn">
            <a href="#" class="pim_btn_b" onclick="subFormDown();" id="subDownLink"><span><ins>提交</ins></span></a>
            </td>
          </tr>
        </table>
  </form>
  
  
  </div>
      <!--right end-->
  
       
     
    </div>
<!--con end-->
<!--footer -->
<!--footer end-->
</body>
</html>

<script language="javascript">
  var message = "";
        var messageShow ="";
        var flag ='u';
        if(messageShow != ""){
   if(flag == 'u'){
    $("#messageUp").css({display:"inline"});
    document.getElementById("messageUp").innerHTML = message;
   }else{
    $("#messageDown").css({display:"inline"});
    document.getElementById("messageDown").innerHTML = message;
   }
         }else{
       if ( message != ""){
       alert(message);

      }

         }
</script>

posted @ 2012-03-22 20:17  欢喜王子  阅读(588)  评论(0编辑  收藏  举报