码迷,mamicode.com
首页 > Web开发 > 详细

js 邮件格式检查

时间:2015-01-16 14:39:18      阅读:129      评论:0      收藏:0      [点我收藏+]

标签:

        /**
         * @returns {boolean} true: email; false: not email
         */
        this.isEmail = function(str){
            console.log("isEmail in");
            var re = /^([a-za-z0-9]+[_|-|.]?)*[a-za-z0-9]+@([a-za-z0-9]+[_|-|.]?)*[a-za-z0-9]+.[a-za-z]{2,3}$/;
            return re.test(str);
        };

js 邮件格式检查

标签:

原文地址:http://www.cnblogs.com/wintersweetwang/p/4228517.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!