<script type="text/javascript">
function insertRow(){
var rowIndex = document.all("addordel_img").length;
if(rowIndex >= 10){
alert('上傳圖片不能超過十個!');
return false;
}
var obj = document.getElementsByName("addordel_img")[0].cloneNode(true);
document.all("change").appendChild(obj);
}
function delRow()
{
event.srcElement.parentNode.removeNode(true);
}
</script>
<table><tr>
<td class="label" align="left">圖片上傳:</td>
<td align="left">
<ul id = "change">
<li id = "addordel_img">
<input name="ImgFiles[]" id="imgfiles" style="height:25px; width:320px;" type="file"/>
<input onclick = "delRow()" type="button" value=" 刪 除 "/>
<input type="button" value="添加" onclick = "insertRow()" />
</li>
</ul>
</td>
</tr><table>