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

js 获取当前标签 jquery1.11.4

时间:2016-08-15 10:09:23      阅读:184      评论:0      收藏:0      [点我收藏+]

标签:

.<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);

        }     

    }

 

js 获取当前标签 jquery1.11.4

标签:

原文地址:http://www.cnblogs.com/godfan/p/5771845.html

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