js 获取当前标签 jquery1.11.4

.<input type="checkbox" onchange='allstu(this);return false;' />

2.<input type="checkbox" onchange='allstuent($(this));return false;' value='1' />

结果 获得

    function allstu(_this){

        console.log(_this.checked);

        console.log(_this);       

    }

 

    function allstuent(_this){

        console.log(_this.val());

        console.log(_this);

    }

 

 

 eq:   function allstu(_this){

        if(_this.checked){

            $("input[name='all']").prop("checked",true);

        }else{

            $("input[name='all']").prop("checked",false);

        }     

    }

 

posted @ 2016-08-15 09:49  上帝为了fan  阅读(178)  评论(0编辑  收藏  举报