NOTICE

(Language : html4strict)
  1. <script type="text/javascript">
  2. function test(index,checked) {
  3.     document.upform["updata[]"][index].disabled = checked;
  4. }
  5. </script>
  6. <form name="upform" enctype="multipart/form-data">
  7.     1<input type="file" name="updata[]" /><input type="checkbox" onclick="test(0,this.checked)" />삭제<br />
  8.     2<input type="file" name="updata[]" /><input type="checkbox" onclick="test(1,this.checked)" />삭제<br />
  9.     3<input type="file" name="updata[]" /><input type="checkbox" onclick="test(2,this.checked)" />삭제<br />
  10.     4<input type="file" name="updata[]" /><input type="checkbox" onclick="test(3,this.checked)" />삭제<br />
  11.     5<input type="file" name="updata[]" /><input type="checkbox" onclick="test(4,this.checked)" />삭제
  12. </form>

[출처 : PHPSCHOOL, by iamSeeker]


해당 열에 있는 input 필드를 체크 박스로 disabled 시키는 방법이다.