现在的位置: 首页 > 综合 > 正文

js往后台Action提交

2013年06月27日 ⁄ 综合 ⁄ 共 606字 ⁄ 字号 评论关闭

 


<script type="text/javascript">

  function subimt(){
   var realpaswd = document.getElementById("realpaswd").value;
//对密码的填入做一些简单的判断
 var oldpswd = document.getElementById("oldpswd").value;
 var newpswd = document.getElementById("newpswd").value;
 var repswd = document.getElementById("repswd").value;
if(oldpswd !=realpaswd){
 alert("旧密码不正确,请重新输入!");
 return false;
   }
if(newpswd !=repswd){
 alert("两次输入的密码不一致,请重新输入!");
 return false;
}
document.getElementById("realpaswd").value = newpswd;
document.forms[1].action= "user_updatePswd.action";
        document.forms[1].submit();
}
  // 禁止右键弹出菜单
document.oncontextmenu = function() {
return false;
}
 </script>

抱歉!评论已关闭.