ASP中如何用VBSCRIPT实现复选框的全选
展开全部
js示例
<script>
function openwin(){
window.open("openwin.asp","openwin","Height=300 width=300");
}
function checkall(){
var obj = document.getElementsByName("cb");
for(m =0;m<obj.length;m++){
if(cball.checked==true){
obj[m].checked = true;
}else{
obj[m].checked = false;
}
}
}
</script>
<script>
myArray = new Array("听音乐","读书","旅游","逛街","其它");
for(m=0;m<5;m++){
document.write("<input type='checkbox' name='cb' />"+"ID:"+m+" 值:"+myArray[m]+"<br>");
}
</script>
<hr />
<input type="checkbox" id="cball" onclick="checkall()" />全选
<script>
function openwin(){
window.open("openwin.asp","openwin","Height=300 width=300");
}
function checkall(){
var obj = document.getElementsByName("cb");
for(m =0;m<obj.length;m++){
if(cball.checked==true){
obj[m].checked = true;
}else{
obj[m].checked = false;
}
}
}
</script>
<script>
myArray = new Array("听音乐","读书","旅游","逛街","其它");
for(m=0;m<5;m++){
document.write("<input type='checkbox' name='cb' />"+"ID:"+m+" 值:"+myArray[m]+"<br>");
}
</script>
<hr />
<input type="checkbox" id="cball" onclick="checkall()" />全选
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询