惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Blog — PlanetScale
Blog — PlanetScale
博客园_首页
WordPress大学
WordPress大学
博客园 - 聂微东
P
Privacy International News Feed
Forbes - Security
Forbes - Security
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Last Week in AI
Last Week in AI
C
CERT Recently Published Vulnerability Notes
月光博客
月光博客
NISL@THU
NISL@THU
美团技术团队
T
Tailwind CSS Blog
Jina AI
Jina AI
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Apple Machine Learning Research
Apple Machine Learning Research
C
Cisco Blogs
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
The Hacker News
The Hacker News
B
Blog
P
Palo Alto Networks Blog
L
Lohrmann on Cybersecurity
有赞技术团队
有赞技术团队
The Register - Security
The Register - Security
S
Securelist
A
Arctic Wolf
MyScale Blog
MyScale Blog
H
Help Net Security
N
Netflix TechBlog - Medium
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
T
Threatpost
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Security Latest
Security Latest
T
Tor Project blog
V
Vulnerabilities – Threatpost
V
V2EX
AI
AI
Hugging Face - Blog
Hugging Face - Blog
大猫的无限游戏
大猫的无限游戏
博客园 - Franky
Simon Willison's Weblog
Simon Willison's Weblog
小众软件
小众软件
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
H
Hackread – Cybersecurity News, Data Breaches, AI and More
T
Troy Hunt's Blog
Schneier on Security
Schneier on Security
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
H
Heimdal Security Blog
Google Online Security Blog
Google Online Security Blog
Know Your Adversary
Know Your Adversary

博客园 - Lucy.Net

http://www.cisco.com/en/US/docs/wireless/access_point/12.3_8_JA/configuration/guide/s38web.html ASP.NET网页的安全性设计 水晶报表打印大小的问题 - Lucy.Net - 博客园 Unix命令大全 求救:vs2003新建asp.net项目时报错:服务器返回的信息无效或不可识别 Windows常用知识 Solarise的一些Q AND A (转贴) 将DataGrid数据写入Excel文件 用.net实现远程获取其他网站页面内容!(核心代码分析) Transact SQL 常用语句以及函数 汇文软件学习笔记 ASP.NET组件设计 Microsoft MSDN Crystalreportviewer 水晶报表 Encode 爱情是什么 33招Google技巧玩 网络邻居问题 Dos大全
vs下的checkbox全选 - Lucy.Net - 博客园
Lucy.Net · 2007-11-07 · via 博客园 - Lucy.Net

webform1.aspx

<%@ Page Language="vb" AutoEventWireup="false" Codebehind="WebForm1.aspx.vb" Inherits="JavascriptStudy.WebForm1"%> 

<%@ Page Language="vb" AutoEventWireup="false" Codebehind="WebForm1.aspx.vb" Inherits="JavascriptStudy.WebForm1"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
 <HEAD>
  <title>WebForm1</title>
  <meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
  <meta content="Visual Basic .NET 7.1" name="CODE_LANGUAGE">
  <meta content="JavaScript" name="vs_defaultClientScript">
  <meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
  <script language="javascript" type="text/javascript" src="./01.js"></script>
 </HEAD>
 <body MS_POSITIONING="GridLayout">
  <form id="Form1" method="post" runat="server">
   <asp:checkbox id="CheckBox0" style="Z-INDEX: 101; LEFT: 16px; POSITION: absolute; TOP: 24px" runat="server"
    p="x" ToolTip="x"></asp:checkbox><asp:checkbox id="CheckBox1" style="Z-INDEX: 102; LEFT: 16px; POSITION: absolute; TOP: 48px" runat="server"
    p="x" ToolTip="x"></asp:checkbox><INPUT id="Button1" style="Z-INDEX: 103; LEFT: 16px; POSITION: absolute; TOP: 96px" type="button"
    value="SelectAll"><INPUT style="Z-INDEX: 104; LEFT: 96px; POSITION: absolute; TOP: 96px" type="button" value="ClearAll"
    id="Button2"></form>
 </body>
</HTML>

01.js

window.onload=initAll;


function checkAll()
{
 var el=document.getElementsByTagName("span");
 for (var i=0;i<el.length;i++)
 {
  if (el[i].p=="x")
  {
   if (el[i].getElementsByTagName("input")[0].getAttribute("type")=="checkbox")
   {
    el[i].getElementsByTagName("input")[0].setAttribute("checked",true);
   }
  }
 }
}
function clearAll()
{
 var el=document.getElementsByTagName("span");
 for (var i=0;i<el.length;i++)
 {
  if (el[i].p=="x")
  {
   if (el[i].getElementsByTagName("input")[0].getAttribute("type")=="checkbox")
   {
    el[i].getElementsByTagName("input")[0].setAttribute("checked",false);
   }
  }
 }
}

function initAll()
{
 document.getElementById("Button1").onclick=checkAll;
 document.getElementById("Button2").onclick=clearAll;
}