<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> 动态增加文件上传域</TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
</HEAD>
<BODY>
<form>
<input type="button" onclick="addline()" value="增加一行">
<table border="0" id="test">
<tr>
<td colspan="2"><input type="file" name="myfile"></td>
</tr>
</table>
<input type="submit">
</form>
<script>
function addline(content){
newline=document.all.test.insertRow();
newline.insertCell().innerHTML='<input type="file" name="myfile"><input type="button" value="删除此行" onclick="del()">'
}
function del(){
document.all.test.deleteRow(window.event.srcElement.parentElement.parentElement.rowIndex);
}
</script>
</BODY>
</HTML>
<HTML>
<HEAD>
<TITLE> 动态增加文件上传域</TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
</HEAD>
<BODY>
<form>
<input type="button" onclick="addline()" value="增加一行">
<table border="0" id="test">
<tr>
<td colspan="2"><input type="file" name="myfile"></td>
</tr>
</table>
<input type="submit">
</form>
<script>
function addline(content){
newline=document.all.test.insertRow();
newline.insertCell().innerHTML='<input type="file" name="myfile"><input type="button" value="删除此行" onclick="del()">'
}
function del(){
document.all.test.deleteRow(window.event.srcElement.parentElement.parentElement.rowIndex);
}
</script>
</BODY>
</HTML>