<script src="${contextPath}/resources/web/js/md5.js" type="text/javascript"></script> <script type="text/javascript"> function doRegister() { if (trim($('#phonenum').val()) == "") { showmsg(0, "请输入手机号码。"); return; } if (trim($('#spassword').val()) == "") { showmsg(0, "请输入密码。"); return; } if (trim($('#checkpassword').val()) == "") { showmsg(0, "请输入确认密码。"); return; } if (trim($('#checkpassword').val()) != trim($('#spassword').val())) { showmsg(0, "输入密码跟确认密码不一致。"); return; } $.ajax({ url : "${contextPath}/web/bandphonesave.htm", data : $("#editForm").serialize()+"&password=" + hex_md5(trim($('#spassword').val())), cache : false, success : function(xmlHttp) { var res = xmlHttp; if (res.errorMessage && res.errorMessage != "") { showmsg(0, res.errorMessage); } else { location.href = "${contextPath}/web/banduserinfo.htm?userid=" + res.llong; } } }); } </script>