Jquery 扩展自定义验证方法

/// <reference path="jquery-1.4.1-vsdoc.js" />



$.fn.extend({
    IsEmpty: function () {
        if ($(this).val() === "" || $(this).val().trim().length == 0) {
            return true;
        }
        else {
            return false;
        }
    },
    IsEmail: function () { }

});

 

posted @ 2014-03-24 15:55  chengdu.jack.li  阅读(93)  评论(0)    收藏  举报