티스토리 뷰

<input type=text id=t>
<input type=checkbox onClick="if(this.checked){t.disabled=1}else{t.disabled=0}">

=======================================

<script>
function test(){
if(document.formname.check.checked){
document.formname.text.disabled=true;
//체크시 활성화
}else{
document.formname.text.disabled=false;
//체크시 비활성화
}
</script>

<html>
<form name=formname>
<input type=checkbox name=check onclick="javascript:test()">
<input type=text name=text disabled>
</form>
<html>

출처 : http://blog.naver.com/ljmgood123/37385259

공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
«   2025/07   »
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
글 보관함