<body>
<script>
function checkAll()
{
var obj_all = document.getElementsByTagName("INPUT");

for(i=0;i<obj_all.length;i++)
if(obj_all[i].type=="checkbox")
obj_all[i].checked = true;
}
</script>
<input type="checkbox">
<input type="checkbox">
<input type="checkbox">
<input type="checkbox">
<input type="checkbox">
<input type="checkbox">
<input type="checkbox">
<input type="checkbox">
<input type="button" onclick="checkAll()" value="看着啦">
</body>
posted on 2007-07-18 18:03  微星  阅读(3246)  评论(0编辑  收藏  举报