DHTML checkbox 選擇的幾種應(yīng)用方法
當(dāng)前位置:點晴教程→知識管理交流
→『 技術(shù)文檔交流 』
[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 編輯過 |
關(guān)鍵字查詢
相關(guān)文章
正在查詢... |