죽은 블로그
홈
방명록
관리자
NOTICE
input 필드 checkbox로 disabled 시키기
Date : 2007. 6. 29. 10:48
Category :
Programming/Javascript
(Language : html4strict)
<script
type
=
"text/javascript"
>
function test(index,checked) {
document.upform["updata[]"][index].disabled = checked;
}
</script>
<form
name
=
"upform"
enctype
=
"multipart/form-data"
>
1
<input
type
=
"file"
name
=
"updata[]"
/
>
<input
type
=
"checkbox"
onclick
=
"test(0,this.checked)"
/
>
삭제
<br
/
>
2
<input
type
=
"file"
name
=
"updata[]"
/
>
<input
type
=
"checkbox"
onclick
=
"test(1,this.checked)"
/
>
삭제
<br
/
>
3
<input
type
=
"file"
name
=
"updata[]"
/
>
<input
type
=
"checkbox"
onclick
=
"test(2,this.checked)"
/
>
삭제
<br
/
>
4
<input
type
=
"file"
name
=
"updata[]"
/
>
<input
type
=
"checkbox"
onclick
=
"test(3,this.checked)"
/
>
삭제
<br
/
>
5
<input
type
=
"file"
name
=
"updata[]"
/
>
<input
type
=
"checkbox"
onclick
=
"test(4,this.checked)"
/
>
삭제
</form>
[출처 : PHPSCHOOL, by iamSeeker]
해당 열에 있는 input 필드를 체크 박스로 disabled 시키는 방법이다.
공유하기
게시글 관리
죽은 블로그
Comment
티스토리툴바