- 1、本文档共12页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 5、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 6、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 7、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 8、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
jquery表单校验(JQuery form check)
jquery表单校验(JQuery form check)
head
meta http equiv = content type content = text / html; charset = utf-8 /
title title 注册
link href = .. /.. /.. / style / main.css rel = stylesheet type = text / css
link href = .. /.. /.. / style / register.css rel = stylesheet type = text / css
link href = .. /.. /.. / style / fee.css rel = stylesheet type = text / css
script type = text / javascript src = .. /.. / scripts / jquery-1.2.6.min.js / td
script type = text / javascript src = .. /.. / scripts / messages _ cn.js / td
script type = text / javascript src = .. /.. / scripts / jquery.validate.js / td
script type = text / javascript
() () {
vildationform ().
();
/ / / / / / / / / / / / / / 表单验证
vildationform () ()
(# regform.validate ()
{
results: {
username: (required): true, digits: true},
userpwd (): true minlength: 6, maxlength: 20).
userpwdagin (): true minlength: 6, maxlength: 20).
usersex: true}, {).
passwordsecond: true}, {).
qq: (required): true, digits: true},
the useremail (true, true); email:
},
messages: {
username: (required): 必填 digits, 只能输入数字},
userpwd (): 必填, minlength 密码最少六位, maxlength, 密码最多20位},
userpwdagin (): 必填, minlength 密码最少六位, maxlength, 密码最多20位},
usersex (): 必填},
passwordsecond (): 必填},
qq: (required): 必填 digits, 只能输入数字},
useremail (): 必填, email: 输入格式有误}
}
();
}
/ / / / / / / / / / / / / / 验证账户
function check () {
var = document.getelementbyid unum (username).value.
reg = ^ 0 {var} ([0, 1], [9 | 0 - 9] | [0-9]) [0-9] {8});
if (! reg.test (unim)) {
alert (手机号码格式有误, 请重新输入);
return;
} else {
.ajax ( $
类型:“得到”,
网址:“/家/检查用户”,
数据:用户名:{唯一},
成功:功能(MES){
如果(MES = =“假”){
警报(“该账户已存在,请重新选择一个”);
返回;
}
}
});
}
}
/ /添加用户
功能adduser() {
如果($(“# regform”)。valid()){
Ajax({美元。
类型:“后”,
网址:“/家/ doreg”,
数据:{ usernum:$(“#用户名”)。val(),
将:$(“#将val()”),
usersex:$(“输入【@型=广播] [ @名称= usersex ] [检查] val() @”),
userscdpwd:$(“# userpwdagin”)。val(),
userqq:$(“# QQ”)。val(),
useremail:$(“# useremail”)。val()
},
成功:功能(MES){
如果(MES = =“true”)
警报(“注册成功”);
其他的
警报(“
您可能关注的文档
- hpf法脱硫(Desulfurization by HPF process).doc
- htc_g3自带软件说明(Htc_g3 comes with software instructions).doc
- hr该如何正确的计算员工离职率(How does HR correctly calculate employee turnover rates).doc
- hr三大暗招反跳槽(HR three big trick reverse job hopping).doc
- html中的一些标签(Some tags in HTML).doc
- html代码优化注意事项(HTML code optimization considerations).doc
- html 标签(HTML tags).doc
- htc自带程序(HTC comes with program).doc
- html各种标签的含意(HTML implications of various labels).doc
- html如何实现身份证号码验证(How does HTML implement identity card number verification).doc
- jquery选择器 简单介绍(The jQuery selector is a simple introduction).doc
- java隐藏文件的读写(Java hides the read and write of files).doc
- jrockit性能调优(jrockit性能调优).doc
- js 100个常用基础写法(JS 100 commonly used basic writing).doc
- java读取文件的几种方法(Several ways to read files by Java).doc
- jsp六种内置对象(JSP six built-in objects).doc
- js 读取xml文档实列教程(JS read the XML document, the actual tutorial).doc
- jsp 构 架--2种方式(JSP framework --2 ways).doc
- jsp四种属性范围(JSP four range of attributes).doc
- jsp和servlet的区别(The difference between JSP and Servlet).doc
最近下载
- 地热资源勘查技术规程.pdf VIP
- 西爱西尔T6CE冷媒冲注机说明书.pdf VIP
- 《大数据技术与应用》课件.ppt VIP
- 水泥系统中控操作操作规程.docx VIP
- 河南省公路路产赔偿标准-(1).doc VIP
- 涉密信息系统集成甲级资质单位名录2024版.pptx VIP
- 1BRIGHTSOURCEENERGY常见问题公司概述公司于何时-亮源公司.PDF VIP
- 2025广西公需科目考试答案(3套,涵盖95_试题)一区两地一园一通道建设;人工智能时代的机遇与挑战.pdf VIP
- 最新骨科临床路径(25个).pdf VIP
- 2014-2015学年度五年级下册英语竞赛卷(单词句子).doc VIP
文档评论(0)