간단히 사용할 체크박스 선택 해제 코드 

<script language="javascript">
<!--
var flag = 0;

function checkAll(field){
if (flag == 0){
for(i = 0; i < field.length; i++) {
field[i].checked = true;
}
flag = 1;
} else {
for(i = 0; i < field.length; i++) {
field[i].checked = false;
}
flag = 0;
}
}
-->
</script>

<form name="chkbox" method="post">
<input type='checkbox' name='check' onclick="checkAll(this.form.checkbox);">

<input type='checkbox' name='checkbox' value='1'>
<input type='checkbox' name='checkbox' value='2'> 

</form> 


신고
YOUR COMMENT IS THE CRITICAL SUCCESS FACTOR FOR THE QUALITY OF BLOG POST