jQuery验证客户端控件, 在提交表单时用MD5.js将密码变成密文

View Code
    
    
    
    
< script language = " javascript " type = " text/javascript " >
function doSubmit() {
if ( ! $( " #<%=form1.ClientID%> " ).valid()) {
return false ;
}
else {
var pwd = document.getElementById( " UserInfoDetail1_txtUserPassword " );
var cpwd = document.getElementById( " UserInfoDetail1_txtConfirmUserPass " );
if (pwd != null && pwd != "" ) {
pwd.value
= hex_md5(pwd.value);
}
if (cpwd != null && cpwd != null ) {
cpwd.value
= hex_md5(cpwd.value);
}
}
}
< / script>

后台CS文件中弹提示, 并跳转:

 this.Page.ClientScript.RegisterStartupScript(this.GetType(), "CSharp", "alert('该角色正在使用, 请联系:111或者222!');window.location.href='RoleList.aspx';", true);

你可能感兴趣的:(jQuery验证客户端控件, 在提交表单时用MD5.js将密码变成密文)