首页 > 代码库 > 系统登陆简单的密码验证

系统登陆简单的密码验证

   <div class="fm-item">
	   <label for="logonId" class="form-label">EOA系统登陆:</label> 
       <input type="text" class="form-control deng i-text" id="username" placeholder="请输入用户名" ajaxurl="demo/valid.jsp"  datatype="s6-18" >   
       <div class="ui-form-explain"></div>
  </div>
  
  <div class="fm-item">
	   <label for="logonId" class="form-label">登陆密码:</label>
	   <input type="password" value="" maxlength="100" id="password" class="i-text form-control deng" datatype="*6-16" nullmsg="请设置密码!">   
       <div class="ui-form-explain"></div>
  </div>
    
  <div class="fm-item">
	   <label for="logonId" class="form-label"></label>
	   <input type="submit" value="" tabindex="4" id="send-btn" class="btn-login" > 
       <div class="ui-form-explain"></div>
  </div>
          <div class="fom">
        	<div id="gai"><a href="http://www.mamicode.com/xiugma.php" style="color:#FFF">忘记密码?</a></div>
            <div id="gai"><a href="http://www.mamicode.com/zhuce.php" style="color:#FFF">注册</a></div>
        </div>

 

<script>

 $(document).ready(function(){
  $("#send-btn").click(function(){
	 var uid =$("#username").val();
	 var pwd = $("#password").val(); 
	 $.ajax({
		 url:"denglu.php",
		 data:{uid:uid,pwd:pwd},
		 type:"POST",
		 dataType:"TEXT",
		 success: function(data){
			 if(data.trim()=="ok")
			  {
			     window.location.href="http://www.mamicode.com/shouye.php"; 
			  }
				else if(data.trim()=="isok")
				{
					 alert("用户还未审核通过");
				}
			  else
			  {
			    alert("用户名或密码输入错误"); 
			  }

			 }
		 })
	 })
});
 
 
</script>

 

系统登陆简单的密码验证