zoukankan      html  css  js  c++  java
  • 用户注册检测(js)

        function isEmail(obj) {
            reg = /^\w{3,}@\w+(\.\w+)+$/;
            $("#emailSure").removeClass('imgSure');
            if (!reg.test(obj)) {
                $("#emailSure").attr("src", "img/error.png");
            }
            else {
                $("#emailSure").attr("src", "img/success.png");
            }
        }
        function isUserName(obj) {
            reg = /^[a-z,A-Z]+$/;
            $("#userSure").removeClass('imgSure');
            if (!reg.test(obj)) {
                $("#userSure").attr("src", "img/error.png");
            }
            else {
                $("#userSure").attr("src", "img/success.png");
            }
        }
        function isPassword(obj) {
            reg =/^[a-z,A-Z]w{5,17}$/;
            $("#passSure").removeClass('imgSure');
            if (!reg.test(obj)) {
                $("#passSure").attr("src", "img/error.png");
            }
            else {
                $("#passSure").attr("src", "img/success.png");
            }
        }
        function affirm(obj) {
            reg=/^[a-z,A-Z]w{5,17}$/;
            reg1 = $("#password1")[0].value;
            reg2 = $("#password2")[0].value;
            $("#passSure1").removeClass('imgSure');
            if (reg1 != reg2||!reg.test(obj)) {
                $("#passSure1").attr("src", "img/error.png");
            }
            else {
                $("#passSure1").attr("src", "img/success.png");
            }
        }
  • 相关阅读:
    一些java的基础知识
    android基础AlertDialog使用
    Js+XML 操作 [ZT]
    [ASP.NET2.0] asp.net在ie7中使用FileUpload上传前预览图片 [ZT]
    C#对图片的几种简单处理 [ZT]
    使用 Bulk Copy 将大量数据复制到数据库 [ZT]
    html中name和id的区别 [ZT]
    两个分页存储过程
    C#常用的文件操作 (转)
    JSON
  • 原文地址:https://www.cnblogs.com/haorensw/p/2415695.html
Copyright © 2011-2022 走看看