일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- tomcat
- Android
- WebLogic
- 가우스
- JDOM
- ibsheet
- MFC
- JSON
- appspresso
- rowspan
- Google Map
- MySQL
- 전자정부프레임워크
- phonegap
- Spring
- Struts
- PLSQL
- GPS
- node.js
- oracle
- iBATIS
- Eclipse
- Ajax
- swingx
- PHP
- dock
- 선택적조인
- jQuery
- jsr 296
- sencha touch
Archives
- Today
- Total
Where The Streets Have No Name
checkbox 전체 선택, 해제 스크립트 본문
<HTML>
<HEAD>
<TITLE>CHECKBOX</TITLE>
<script>
function check(){
cbox = input_form.chk;
if(cbox.length) { // 여러 개일 경우
for(var i = 0; i<cbox.length;i++) {
cbox[i].checked=input_form.all.checked;
}
} else { // 한 개일 경우
cbox.checked=input_form.all.checked;
}
}
</script>
</HEAD>
<BODY>
<form name="input_form">
<input type="checkbox" name="all" onclick="check();">check all<br>
<input type="checkbox" name="chk" value="01" color="white">TEST1<br></font>
<input type="checkbox" name="chk" value="02" color="white">TEST2<br></font>
<input type="checkbox" name="chk" value="03" color="white">TEST3<br></font>
<input type="checkbox" name="chk" value="04" color="white">TEST4<br></font>
</form>
</body>
</html>
<HEAD>
<TITLE>CHECKBOX</TITLE>
<script>
function check(){
cbox = input_form.chk;
if(cbox.length) { // 여러 개일 경우
for(var i = 0; i<cbox.length;i++) {
cbox[i].checked=input_form.all.checked;
}
} else { // 한 개일 경우
cbox.checked=input_form.all.checked;
}
}
</script>
</HEAD>
<BODY>
<form name="input_form">
<input type="checkbox" name="all" onclick="check();">check all<br>
<input type="checkbox" name="chk" value="01" color="white">TEST1<br></font>
<input type="checkbox" name="chk" value="02" color="white">TEST2<br></font>
<input type="checkbox" name="chk" value="03" color="white">TEST3<br></font>
<input type="checkbox" name="chk" value="04" color="white">TEST4<br></font>
</form>
</body>
</html>