ASP.NET实现个人信息注册页面并跳转显示(2)

@{ ViewBag.Title = "Show"; } <h2>个人信息展示</h2> <table> <tr> <th>用户名</th> <th>@Request["username"]</th> </tr> <tr> <th>密码</th> <th>@Request["psd"]</th> </tr> <tr> <th>确认密码</th> <th>@Request["psd_again"]</th> </tr> <tr> <th>性别</th> <th>@Request["gender"]</th> </tr> <tr> <th>籍贯</th> <th>@Request["native_place"]</th> <th>@Request["major"]</th> </tr> <tr> <th>Email</th> <th>@Request["email"]</th> </tr> <tr> <th>手机号</th> <th>@Request["phone"]</th> </tr> <tr> <th>专业擅长</th> <th>@Request["speciality"]</th> </tr> <tr> <th>业余爱好</th> <th>@Request["hobby"]</th> </tr> <tr> <th>个人照片</th> <th><img src="https://www.jb51.net/~/Content/UpLoad/111.png" alt="" /></th> </tr> <tr> <th>出生年月</th> <th>@Request["birthday"]</th> </tr> <tr> <th>备注信息</th> <th>@Request["more_info"]</th> </tr> </table>

my_script.js

function checkName() { var u = document.getElementById("username"); var t = document.getElementById("tip_name"); var reg = /^[a-z]{6,10}$/; if (!reg.test(u.value)) { t.innerHTML = "用户名为6-10个小写字母"; return false; } else { if (u.value == "wustzz") { t.innerHTML = "用户名不可以为wustzz"; return false; } t.innerHTML = "用户名填写正确"; return true; } } function checkPassword() { var p = document.getElementById("psd"); var t = document.getElementById("tip_psd"); var reg = /^\d{6}$/; if (!reg.test(p.value)) { t.innerHTML = "密码为6位数字"; return false; } else { t.innerHTML = "密码填写正确"; return true; } } function checkPasswordAgain() { var p1 = document.getElementById("psd"); var p2 = document.getElementById("psd_again"); var t = document.getElementById("tip_psd_again"); if (p1.value != p2.value) { t.innerHTML = "密码前后不一致" return false; } else { t.innerHTML = "密码确认一致"; return true; } } function checkEmail() { var e = document.getElementById("email"); var t = document.getElementById("tip_email"); var reg = /^[\w-]+(\.[\w-]+)*@[\w-]+(\.[\w-]+)+$/; if (!reg.test(e.value)) { t.innerHTML = "必须填写Email格式"; return false; } else { t.innerHTML = "Email填写正确"; return true; } } function checkPhone() { var p = document.getElementById("phone"); var t = document.getElementById("tip_phone"); var reg = /^1569\d{7}$/; if (!reg.test(p.value)) { t.innerHTML = "手机是11位以1569开头的数字"; return false; } else { t.innerHTML = "填写手机正确"; return true; } } function checkAll() { if (checkName() && checkPassword() && checkPasswordAgain() && checkEmail() && checkPhone()) { return true; } return false; }

源码地址:

以上所述是小编给大家介绍的ASP.NET实现个人信息注册页面并跳转显示,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对脚本之家网站的支持!

您可能感兴趣的文章:

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wjywwd.html