你的位置:首页 > 软件开发 > Java > 页面的checkbox框的全选与反选

页面的checkbox框的全选与反选

发布时间:2015-09-25 20:00:14
if (typeof jQuery == undefined) { alert("请先导入jQuery"); } else { jQuery.extend({ quan_fan: quan_fan }); } functi ...
  if (typeof jQuery == 'undefined') {    alert("请先导入jQuery");  } else {    jQuery.extend({      quan_fan: quan_fan    });  }  function quan_fan(all,other)  {    /// <summary>    ///     全选,反选    /// </summary>    /// <param name="all">全选(按钮(checkbox))JQuery对象</param>    /// <param name="other">其它(按钮(checkbox))JQuery对象</param>    all.click(function () {      if (all[0].checked == true) {        other.each(function () {          this.checked = true;        });      }      else {        other.each(function () {          this.checked = false;        });      }    });    other.not(":eq(0)").each(function () {      $(this).click(function () {        if (this.checked == false) {          all[0].checked = false;        }      });    });  }

原标题:页面的checkbox框的全选与反选

关键词:

*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。

可能感兴趣文章

我的浏览记录