DHTML checkbox 选择的几种应用方法
当前位置:点晴教程→知识管理交流
→『 技术文档交流 』
[color=#008200]//================================================================================== [/color] [color=#008200]// copyright (c) 1998-2007 by www.bizservice.com.cn, all rights reserved. [/color] [color=#008200]// email:contact@bizservice.com.cn, hangzhou, china [/color] [color=#008200]// [/color] [color=#008200]// this software is the confidential and proprietary information of [/color] [color=#008200]// bizservice.com.cn. ("confidential information"). you shall not disclose [/color] [color=#008200]// such confidential information and shall use it only in accordance [/color] [color=#008200]// with the terms of the license agreement you entered into with bizservice.com.cn. [/color] [color=#008200]//================================================================================== [/color] [color=#008200]// author: wilson lin [/color] [color=#008200]// date: 2004-6-15 14:19:50 [/color] [color=#008200]// description: [/color] [color=#008200]// 无 [/color] [color=#008200]// function list: [/color] [color=#008200]// 1. 无 [/color] [color=#008200]// history: [/color] [color=#008200]// 1. 无 [/color] [color=#008200]//================================================================================== [/color] [color=#008200]// 全选 [/color] [b][color=#7f0055]function[/color][/b] checkall(form) { [b][color=#7f0055]for[/color][/b] ([b][color=#7f0055]var[/color][/b] i=0; i [b][color=#7f0055]var[/color][/b] e = form.elements[i]; [b][color=#7f0055]if[/color][/b] (e.type==[color=#0000ff]"checkbox"[/color]) e.checked = [b][color=#7f0055]true[/color][/b] ; } } [color=#008200]// 全不选 [/color] [b][color=#7f0055]function[/color][/b] checknotall(form) { [b][color=#7f0055]for[/color][/b] ([b][color=#7f0055]var[/color][/b] i=0; i [b][color=#7f0055]var[/color][/b] e = form.elements[i]; [b][color=#7f0055]if[/color][/b] (e.type==[color=#0000ff]"checkbox"[/color]) e.checked = [b][color=#7f0055]false[/color][/b] ; } } [color=#008200]// 是否有选中的项 [/color] [b][color=#7f0055]function[/color][/b] ischecked(form){ [b][color=#7f0055]for[/color][/b] ([b][color=#7f0055]var[/color][/b] i=0; i [b][color=#7f0055]var[/color][/b] e = form.elements[i]; [b][color=#7f0055]if[/color][/b] (e.type==[color=#0000ff]"checkbox"[/color]){ [b][color=#7f0055]if[/color][/b](e.checked){ [b][color=#7f0055]return[/color][/b] [b][color=#7f0055]true[/color][/b]; } } } [b][color=#7f0055]return[/color][/b] [b][color=#7f0055]false[/color][/b]; } 该文章在 2010/7/24 15:28:24 编辑过 |
关键字查询
相关文章
正在查询... |