js控制input type=checkbox 的勾选


    $(function () {
        //双击表格弹出窗口
        //为jQuery类添加类方法,可以理解为添加静态方法
        $.extend({
                'getInfo': function (id) {
                    //pdialog:应该是DWZ的方法
                    $.pdialog.open("__URL__/showinfo/id/" + id, 'dialog', '查看会员信息', {maxable:false,mask:true,width:500,height:300});
                },
                'delete_this': function(obj){
                    var _this = obj;
                    var input_obj = $(_this).find("input[type='checkbox']");
                    if($(input_obj).attr('checked') == 'checked'){     //如果已经勾选.则取消勾选
                        $(input_obj).attr('checked',null)
                    }else{
                        $(input_obj).attr('checked','checked')
                    }
                }  
            });
    });


   
                     
                    
                    {$vo['id']}
                    {$vo['username']}
                    {$vo['email']}
                    {$vo['user_money']}
                    {$vo['reg_time']}
                    {$vo['qq']}
                    正常禁止
                
            

转载于:https://www.cnblogs.com/meibao/p/4618976.html

你可能感兴趣的:(javascript)