<html>
<head>
<script type="text/javascript">
function CheckAll(thisForm){
if(thisForm.select.checked==true){
for(i=0;i<thisForm.option.length;i++){
thisForm.option[i].checked=true;
}
}else{
for(i=0;i<thisForm.option.length;i++){
thisForm.option[i].checked=false;
}
}
}
</script>
</head>
<body>
<form name="myForm">
<input type="checkbox" name="select" οnclick="CheckAll(this.form)">
<br />
<input type="checkbox" name="option">苹果<br />
<input type="checkbox" name="option">桔子<br />
<input type="checkbox" name="option">香蕉<br />
<input type="checkbox" name="option">西瓜
</form>
</body>
</html>