DHTML checkbox 选择的几种应用方法

js 代码
 
  1. //==================================================================================    
  2. // Copyright (c) 1998-2007 by www.bizservice.com.cn, All rights reserved.    
  3. // Email:contact@bizservice.com.cn, HangZhou, China    
  4. //    
  5. // This software is the confidential and proprietary information of    
  6. // Bizservice.Com.Cn. ("Confidential Information"). You shall not disclose    
  7. // such Confidential Information and shall use it only in accordance    
  8. // with the terms of the license agreement you entered into with Bizservice.Com.Cn.    
  9. //==================================================================================    
  10. // Author: Wilson Lin    
  11. // Date: 2004-6-15 14:19:50    
  12. // Description:        
  13. //     无    
  14. // Function List:         
  15. //     1. 无    
  16. // History:    
  17. //     1. 无    
  18. //==================================================================================    
  19.     
  20. // 全选    
  21. function checkAll(form) {    
  22.     for (var i=0; i
  23.        var e = form.elements[i];    
  24.        if (e.type=="checkbox")    
  25.            e.checked = true ;    
  26.     }    
  27. }    
  28.     
  29. // 全不选    
  30. function checkNotAll(form) {    
  31.     for (var i=0; i
  32.        var e = form.elements[i];    
  33.        if (e.type=="checkbox")    
  34.            e.checked = false ;    
  35.     }    
  36. }    
  37.     
  38. // 是否有选中的项    
  39. function isChecked(form){    
  40.     for (var i=0; i
  41.        var e = form.elements[i];    
  42.        if (e.type=="checkbox"){    
  43.            if(e.checked){    
  44.               return true;    
  45.            }    
  46.        }    
  47.     }    
  48.     return false;    
  49. }    
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值