일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- MFC
- Google Map
- WebLogic
- JDOM
- rowspan
- Struts
- Spring
- jsr 296
- Ajax
- PHP
- PLSQL
- 선택적조인
- Eclipse
- 가우스
- swingx
- phonegap
- iBATIS
- sencha touch
- ibsheet
- Android
- oracle
- dock
- JSON
- jQuery
- GPS
- node.js
- MySQL
- tomcat
- 전자정부프레임워크
- appspresso
- Today
- Total
Where The Streets Have No Name
다이나믹한 파일업로드 폼 본문
var AtthNum = 0;
function AppendAttachFile() {
var AtthBox = "";
var AtthOk = true;
if(AtthNum >= 10)
return;
if(AtthNum > 0) {
var file;
AtthBox = "document.Attach.A" + (AtthNum - 1);
AtthBox += ".value";
file = eval(AtthBox);
if(file.length <= 0)
AtthOk = false;
}
if(AtthOk) {
var Atth= "document.all.AtthBox" + (AtthNum);
Atth += ".style.display = ";
Atth += "(document.all.AtthBox" + (AtthNum);
Atth += ".style.display == ''none'') ? '''' : ''none''";
eval(Atth);
AtthNum++;
}
}
</script> <form Name="Attach" enctype="multipart/form-data" action="HIServlet" method="post">
<input type="button" value="파일추가" onClick="AppendAttachFile();">
<table border="0" cellspacing ="0" cellpadding ="0" style="width:100%">
<tr>
<td align="left"><input name="A0" type="FILE" style="display:none; width=385px;" id="AtthBox0"></td>
</tr>
<tr>
<td align="left"><input name="A1" type="FILE" style="display:none; width=385px;" id="AtthBox1"></td>
</tr>
<tr>
<td align="left"><input name="A2" type="FILE" style="display:none; width=385px;" id="AtthBox2"></td>
</tr>
<tr>
<td align="left"><input name="A3" type="FILE" style="display:none; width=385px;" id="AtthBox3" ></td>
</tr>
<tr>
<td align="left"><input name="A4" type="FILE" style="display:none; width=385px;" id="AtthBox4"></td>
</tr>
<tr>
<td align="left"><input name="A5" type="FILE" style="display:none; width=385px;" id="AtthBox5"></td>
</tr>
<tr>
<td align="left"><input name="A6" type="FILE" style="display:none; width=385px;" id="AtthBox6"></td>
</tr>
<tr>
<td align="left"><input name="A7" type="FILE" style="display:none; width=385px;" id="AtthBox7"></td>
</tr>
<tr>
<td align="left"><input name="A8" type="FILE" style="display:none; width=385px;" id="AtthBox8"></td>
</tr>
<tr>
<td align="left"><input name="A9" type="FILE" style="display:none; width=385px;" id="AtthBox9"></td>
</tr>
</table>
</form>