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.each(function () {
        $(this).click(function () {
            if (this.checked == false) {
                all[0].checked = false;
            }
        });
    });
}
  使用
  aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAR0AAABbCAIAAADBfsbpAAAJ2UlEQVR4nO2dS47cNhCGdQlvdR4dR0fwHXSErLPULYxxjECxk8nYcB62YTvAIAGmYcfBZKFXFatIkWxKYqv/H8KgR02VKKk+VoktUsVjUhVPC8+VoYUh6IKU0olDOTkfQgjKU7txVTwt5FehEEJQnoKzQlB6gSsISi9wBUHpVXz8+DcW2/L6tx/lUhSFXLl7VbFktYAr1wKusMQtq+SBRXGQ9PK3dz/RpSiK/m//gS571xTKS+kBKIiSG49WXJUkVJQucAXZlNj1e8elf3PQVBNwBW2jFbnKR9H1kVBJwMAVJLVWHuhfcipPNzSMGFmcusniLoySPjbBFRSntfotFtEysIlY6Z/dyQKeNsEVFKcV+wMXI4n8rK6c/rWxFMGVp01wBcVpt36LIK5kgfO58rEJrqA4bcGVmhaenweqphy1itg7+gOhOK34+5WxxlFSFpYZmiq3fcdePG2CKyhOWTxvEVp+M+F5CyhO+zu0GkzOsZPK4KPgSt5WgStIFZ67dS147hZL3AKuXIvKlbrsXlUsWS3754EXp+9fvZPL3pWC8hK4gqD0SsNV6Axn37799/rNh+cv7p7d3GLBsvvy/MXd7d27r1+/JcHhMQlXEdNrvn7z4f37v06n0wME5aFPn+9f/fJHhPPr/h9qSDXtuXLS8xd3gArKTc9ubpP5f4ShZaNLc2g+u7nd+xxCkClwBUHpZXBlm5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fYPzxRlrmU2HXonu8gk+eniHVDz8Wt1oOFc9CQZU5H0RTpzKhQjh+ivY1UNs75WTWubQ++YXE2ty3ACtsCqa6qyqix97rQUI8m8bH0HiOhVdv5sZdpkjaiKFSumtQEyJMxhv63HWpotNW3U59sU5v4iwJoZnAwYWl4gvtF67AiBhlVXE8BjqhE5SdfP3MGhXvFDcpVYSneBCIdDPFlMFvn9zdCMaw46OSZpFNw2L0XWDNC9TbquddrWiBD1IFIMcv3p9OQ0RZAHAa421hoQXA5YNM1jKd+iJuc+Fy9bhEkrcAVdi8QvUCsKXEFQeoErCEovcAVB6XXxXN38cHc6nfY+jRDEdPFc3f7656fP93ufRgiadX//T/fybSoP34erL1//ffnz789ubrFgyWTpXr49nb6k8vAtuCpGrWR8+vzdkyfTX4fcBaZvF4vZluhdq2UWbSaR7dStdNUOr+3O2jlXyLFtEFc+DHjSEufroVt5Qn6+wFVa/Q/sY/349sxfawAAAABJRU5ErkJggg==" alt="" />

页面的checkbox框的全选与反选的更多相关文章

  1. 【jQuery】复选框的全选、反选,推断哪些复选框被选中

    本文与<[JavaScript]复选框的全选.反选.推断哪些复选框被选中>(点击打开链接)为姊妹篇,把里面内容再与jQuery框架中实现一次,相同做到例如以下的效果: 布局还是相同的布局, ...

  2. jQuery实现复选框的全选、反选、并且根据复选框的<checked属性>控制多个对应div的显示/隐藏

    <!doctype html><html> <head> <meta charset="utf-8"> <title>j ...

  3. Jquery 利用单个复选款(checkbox)实现全选、反选

    1 <script type="text/javascript"> $(function(){ //全选 $("#CheckedAll").clic ...

  4. jQuery 实现复选框的全选与反选

    <script> //实现全选与反选 $(".allAndNotAll").click(function () { if ($(this).prop("che ...

  5. jquery简单实现复选框的全选与反选

    <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title> ...

  6. angular4 checkbox复选框的全选,反选及个别选择

    <label><input type="checkbox" name="" [(ngModel)]="master"> ...

  7. jQuery实现复选框的全选、反选功能

    <ul id="list"> <li><label><input type="checkbox" value=&quo ...

  8. checkbox的单选全选,反选,计算价格,删除

    activity_main.xml <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android&qu ...

  9. 如何利用jq来实现复选框的全选,反选!

    $("document").ready(function(){ $("#btn1").click(function(){ $("[name='chec ...

随机推荐

  1. Java:HttpClient篇,Cookie概述,及其在HttpClient4.2中的应用

    1. Cookie 概述 Cookie是什么? Cookie 是一小段文本信息,伴随着用户请求和页面在 Web 服务器和浏览器之间传递.Cookie 包含每次用户访问站点时 Web 应用程序都可以读取 ...

  2. CSS选择器、层叠相关的基础知识

    CSS是Cascading Style Sheets的英文缩写,即层叠样式表.CSS2.1是W3C于2007年发布,现在推荐使用的.CSS3现在还处于开发中,有部分浏览器的新版本支持. 1. CSS ...

  3. vim设置文本宽度

    'textwidth' 'tw'        number  (default 0)                        local to buffer                   ...

  4. 【Android】4.4 示例--列出手机上的所有联系人

    分类:C#.Android.VS2015:创建日期:2016-02-06 项目名:DesignerWalkthrough 模板:Blank App(Android) 功能:列出手机上的所有联系人. 说 ...

  5. angular学习笔记(十四)-$watch(3)

    同样的例子,还可以这样写: <!DOCTYPE html> <html ng-app> <head> <title>11.3$watch监控数据变化&l ...

  6. Java IP地址字符串与BigInteger的转换, 支持IPv6

    1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 3 ...

  7. scrollTop兼容封装

    <!DOCTYPE html> <html> <head lang="en"> <meta charset="UTF-8&quo ...

  8. Datax将本地文件导入Hbase数据库!!!酷酷酷

    Hbase Writer的json文件链接: https://github.com/alibaba/DataX/blob/master/hbase11xwriter/doc/hbase11xwrite ...

  9. TOMCAT8源码分析——处理请求分析(下)

    前言 本文继续讲解TOMCAT的请求原理分析,建议朋友们阅读本文时首先阅读过<TOMCAT源码分析——请求原理分析(上)>和<TOMCAT源码分析——请求原理分析(中)>.在& ...

  10. python学习笔记(15)--pygame的安装

    说明: 1. 现在是2017.3.9号,最新的python版本是3.6,最新的pygame是1.9.3,这两个最好都用32位的. 2. pygame1.9.3下载地址:http://www.lfd.u ...