자꾸 질문드리게 되네요 스크립트로 value값 변경시키는 방법이요

2
환절기에 수고 많으십니다.

스크립트로 value값 변경시키는 방법인데요.
될듯될듯 안되서 질문 드립니다.

html부분은
<form method="post" action="">
<input type="hidden" value="" name="ch_file[0]" />
<input type="file" onchange="edit_file(this.form,'0',18)" name="bf_file[]" />
<input type="hidden" value="" name="ch_file[1]" />
<input type="file" onchange="edit_file(this.form,'1',19)" name="bf_file[]" />
</form>

js부분
function edit_file(form, ch, uid) {
var del_id = "ch_file["+ch+"]";
form.del_id.value = uid;
}
위와 같은데 value값이 변경이 안되는지 $_POST로 확인해도 NULL값이 나옵니다.


그리고
html부분을
<input type="file" onchange="edit_file(this.form,'ch_file[0]',18)" name="bf_file[]" />

js부분을
function edit_file(form, ch, uid) {
form.ch.value = uid;
}
이렇게 해도 안되네요.

참고로
function edit_file(form, ch, uid) {
var del_di = "ch_file["+ch+"]";
var aa = form.mr_name.value;
var bb = form."ch_file["+ch+"]".value;

alert(aa); // 제대로 값이 경고창에 표시됨
alert(del_di); // ch_file[0]으로 표시됨
alert(bb); // 실행이 안됨
}
이렇네요

도움 좀 부탁드립니다.
식사 맛있게 하세요
댓글
  • No Nickname
    No Comment
  • 권한이 없습니다.
    {{m_row.m_nick}}
    -
목록형 📷 갤러리형
제목
태그 적용
여보세요? 손님도 적으실 수 있습니다. 9
4.28
4.29
4.30
5.1
5.2
5.3
5.4
5.5
5.6
5.7
5.8
5.9
5.10
5.11
5.12
5.13
5.14
5.15
5.16
5.17
5.18
5.19
5.20
5.21
5.22
5.23
5.24
5.25
5.26
5.27
5.28
5.29
5.30
5.31
6.1