<div>
<div id="Layer1">
<form id="form1" name="form1" method="post" action="mailto:ed388@163.com" enctype="text/plain">
<fieldset>
<legend><span class="STYLE3">国语</span></legend>
<table align="center" width="683" height="675" border="1">
<tr>
<td colspan="3"><div align="center"><span class="STYLE5">动听音乐网华语榜单</span></div></td>
</tr>
<tr>
<td><span class="STYLE1">华人男歌手歌曲排行</span></td>
<td><span class="STYLE1">华人女歌手歌曲排行</span></td>
<td><span class="STYLE1">乐队歌曲排行</span></td>
</tr>
<tr>
<td width="234">
<label>
<input type="checkbox" name="a" />
<span class="STYLE1"><a>难道爱一个人有错吗</a></span></label>
<p>
<label>
<input type="checkbox" name="b" />
<span class="STYLE1"><a>青花瓷</a></span></label>
</p>
<p>
<label>
<input type="checkbox" name="c" />
<span class="STYLE1"><a>稻香</a></span></label>
</p>
<p>
<label>
<input type="checkbox" name="d" />
<span class="STYLE1"><a>当我孤独的时候还可以抱</a></span></label>
</p>
<p>
<label>
<input type="checkbox" name="e" />
<span class="STYLE1"><a>爱情里没有谁对谁错</a></span></label>
</p>
<p>
<label>
<input type="checkbox" name="f" />
<span class="STYLE1"><a>给我一首歌的时间</a></span></label>
<p>
<label>
<input type="checkbox" name="g" />
<span class="STYLE1"><a>不要就这样离开</a></span></label>
</p>
... ...
<p>
<script type="text/javascript">
var ic = document.getElementsByTagName("input");
function csv(obj){
for(i=0;i<ic.length;i++){
if(ic[i].type=="checkbox") ic[i].checked=obj.checked;
}
}
</script>
<label>
<input type="checkbox" onClick="csv(this);" />
<span class="STYLE1">全选</span></label>
</p>
</td>
</tr>
</table>
</fieldset>
</form>
</div>
</div>
</body>
http://www.jingyanzhinan.cn/article-1000-1.html以上内容就是关于【JS实现多选框效果_多选框 】的指南经验分享;您也可以通过下方的评论互动,发表您的意见和观点,让更多人通过生活指南经验分享因之受益,让生活变得更简单。