Home > Web Front-end > JS Tutorial > body text

解放web程序员的输入验证_表单特效

WBOY
Release: 2016-05-16 19:25:30
Original
1083 people have browsed it
本程序最初是由wanghr100(灰豆宝宝.net)的checkForm基础上进行修改的,增加了很多功能,如下:
  • 对非ie的支持
  • 增加了内置表达式和内置提示
  • 增加了显示方式(弹出式和页面显示式)
  • 增加了显示一条和显示全部
  • 进行了封装(CLASS_CHECK)
  • 支持外接函数或表达式(应用在密码一致)
  • 简化了调用方式,所有操作只需要
 
声明: 对本程序可以任意复制传播,但请保留声明部分,对于内置的表达式有些没有做到很严格,如果你有好的建议和意见,欢迎邮件和我联系或者上我的博客留言 

简介:

    本程序只需要对需要验证的标签设置三个属性:usage,exp,tip
 
  • usage     : 内置格式或表达式或函数
  • exp        : 正则表达式(注意如果指定了usage则忽略exp)
  • tip          : 出错提示(如果是内置格式可以不要此属性,有缺省提示)
 
    调用时只需要引用,然后为每个标记增加以上3个属性(不一定需要全部) ,注意本js的默认编码是gb2312,如果你的.net程序是utf-8,可以把js另存为utf-8格式的,或者该webconfig里编码为gb2312
 
演示:
下载:
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!