- 1、本文档共20页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 5、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 6、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 7、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 8、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
javascrip脚本之表单验证(javascrip脚本之表单验证)
javascrip脚本之表单验证(javascrip脚本之表单验证)
Reprint:
The 1:js string length limit, determine the character length, JS limit input, input, textarea limit does not limit the length of
2.: determine whether the input JS Chinese characters, Chinese characters, Chinese characters only
3:js to determine whether the input English, only English
4:js can only enter numbers, numbers, numbers, verify the judgment to determine whether the detection of digital, digital, digital input only
5: can only enter English characters and numbers
6: JS email, JS email, judge the verification / validation email mailbox format
7:js character filtering, shielding keyword
8:js password authentication, password judgment
2.1: JS is not null, null or not object, judgment is empty, judgment is not empty
2.2: two is the value of the same item form
2.3: form only for digital and _,
2.4: form input / length limit value
2.5: Chinese / English / number / email address to determine the legality of
2.6: cannot form limited input characters
Since the character control form 2.7
General check function 2.8:form Text Domain
1. length limit
script
Function (test)
{
If (document.a.b.value.length50)
{
Alert (cannot exceed 50 characters! );
(document.a.b.focus);
Return false;
}
}
/script
form name=a onsubmit= return (test) .
textarea name= B cols= 40 wrap= VIRTUAL rows= 6 /textarea
input type= submit name= Submit value= check
/form
The 2. is the only Chinese characters
input onkeyup= value= /oblog/value.replace (/[^\u4E00-\u9FA5]/g ) .
3. only English
script language=javascript
Function (onlyEng)
{
((event.keyCode=65event.keyCode=90) if!)
Event.returnvalue=false;
}
/script
input onkeydown= (onlyEng);
The 4. is the only digital
script language=javascript
Function (onlyNum)
{
If (! ((event.keyCode=48event.keyCode=57) || (event.keyCode=96event.keyCode=105)))
Consider / numeric keys on the keypad
Event.returnvalue=false;
}
/script
input onkeydown= (onlyNum);
The 5. is the only English characters and numbers
input onkeyup=
您可能关注的文档
- gtasa enbseries.ini 修改教程(Gtasa enbseries.ini 修改教程).doc
- h3c7506e(h3c7506e).doc
- h618适配车型遥控匹配资料(H618 adaptation model remote matching data).doc
- gtk_图形化应用程序开发学习笔记(十八)—滚动窗口构件、分栏窗口构件(Gtk_ graphical application development study notes (eighteen) - rolling window component, column widget).doc
- hadoop2.5.1伪分布模式ubuntu下超详细安装含eclipse插件安装(Hadoop2.5.1 pseudo distribution mode, Ubuntu under super detailed installation, including Eclipse Plug-in installation).doc
- hahah(哈哈哈).doc
- g蛋白藕联(G protein coupling).doc
- hamming code海明码学习笔记(汉明码海明码学习笔记).doc
- handlebars自定义helper的写法(Handlebars custom helper writing).doc
- hauxue(hauxue).doc
- 公共基础知识选调生考试(行政职业能力测验)综合能力测试题1套.docx
- 2025年中国农业银行宁夏回族自治区分行春季招聘58人笔试备考题库及参考答案详解一套.docx
- 2025年中国信息通信研究院招聘30名应届高校毕业生笔试备考题库含答案详解.docx
- 2025年中国农业银行陕西省分行春季招聘90人笔试高频难、易错点备考题库及参考答案详解1套.docx
- 2025年中国农业银行山东省分行春季招聘193人笔试高频难、易错点备考题库及完整答案详解1套.docx
- 2025年中国医学科学院医药生物技术研究所第一批招聘22人笔试备考题库及完整答案详解1套.docx
- 2025年中国农业银行福建省分行春季招聘63人笔试高频难、易错点备考题库及答案详解一套.docx
- 2025年中国医学科学院输血研究所社会公开招聘笔试高频难、易错点备考题库及答案详解1套.docx
- 2025年中国医学科学院放射医学研究所第一批招聘笔试高频难、易错点备考题库参考答案详解.docx
- 2025年中国中医科学院针灸研究所面向社会招聘笔试备考题库含答案详解.docx
文档评论(0)