您的位置:首页 > Web前端 > JQuery

jQuery实现禁用启用按钮

2016-07-11 18:26 537 查看
(function($)

{

    $.fn.extend({

        disable: function()

        {

            return this.each(function()

            {

                $(this).addClass("disable").attr({

                    disabled: true

                });

            });

        },

        enable: function()

        {

            return this.each(function()

            {

                $(this).removeClass("disable").removeAttr('disabled');

            });

        }

    });

})(jQuery);
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: