<HTML>
<HEAD>
<style>
.btn {
BORDER-RIGHT: #7b9ebd 1px solid; PADDING-RIGHT: 2px; BORDER-TOP: #7b9ebd 1px solid; PADDING-LEFT: 2px; FONT-SIZE: 12px; FILTER: progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr=#ffffff, EndColorStr=#cecfde); BORDER-LEFT: #7b9ebd 1px solid; CURSOR: hand; COLOR: black; PADDING-TOP: 2px; BORDER-BOTTOM: #7b9ebd 1px solid
}
.btn1 {
BORDER-RIGHT: #7b9ebd 1px solid; PADDING-RIGHT: 2px; BORDER-TOP: #7b9ebd 1px solid; PADDING-LEFT: 2px; FONT-SIZE: 12px; FILTER: progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr=#ffffff, EndColorStr=#cecfde); BORDER-LEFT: #7b9ebd 1px solid;COLOR: black; PADDING-TOP: 2px; BORDER-BOTTOM: #7b9ebd 1px solid
}
</style>
<script language="JavaScript">
var num = 0;
//insert a row
function addRow()
{
var dataBox = document.getElementById("dataBox");
var otr = dataBox.insertRow(dataBox.rows.length);
var otd = otr.insertCell();
otd.height = "25";
num = num + 1
var sHTML = "<input type='file' name='file"+num+"' SIZE='40' style='border:1px solid #eeeeee; background-color:#eeeeee'>"
otd.innerHTML = sHTML;
}
//delete a row
function delrow()
{
var i = 0,otr;
var dataBox = document.getElementById("databox");
i=num;
if(num!=0){
otr = dataBox.deleteRow(i);
num--;
}
}
function check(){
var file=document.FORM.file0.value;
if(file==""){
alert("please select upload file!");
return false;
}
}
</script>
</HEAD>
<BODY BGCOLOR="white">
<FORM NAME="FORM" METHOD="POST" ACTION="upload.jsp" ENCTYPE="multipart/form-data" onsubmit="return check()">
<table>
<tr><td>
<button name="btnAddRow" onclick="addRow()" class = "btn">Add Row</button>
</td><td>
<button name="btnDeleteRow" onclick="delrow()" class = "btn">Delete Row</button>
</td></tr>
</table>
<table width="80%" id="dataBox" class="tblBillDetail" cellspacing="0" cellpadding="0" height="0" border="0">
<tr><td><input type='file' name='file0' SIZE='40' style='border:1px solid #eeeeee; background-color:#eeeeee'></td></tr>
</table>
<table>
<tr><td>
<INPUT class = "btn" TYPE="SUBMIT" VALUE="Upload">
<p class = "btn1">Max Files Size :10000(KB)<br>Allowed upload :jpg,gif,txt,pdf,doc,xls</p>
</td></tr>
</table>
</FORM>
</BODY>
</HTML>