<html>
<head>
<title>untitled document</title>
<meta http-equiv="content-type" content="text/html; charset=gb2312">
</head>
<body bgcolor="#ffffff" text="#000000">
<table>
<tr>
<td><input type="tex" name="text"></td>
<td bgcolor="#ffffff"><input type="text" name="text"></td><td bgcolor="#ffffff"><input type="text" name="text"></td><td bgcolor="#ffffff"><input type="text" name="text"></td><td ><input type="text" name="text"></td>
</tr>
</table>
<input type="button" name="add_line" value="增加下一行" onclick="addfileinput()">
</body>
</html>
<script language="vbscript">
nowfileinputno = 1
nowfileinputcount = 0
sub addfileinput()
if nowfileinputcount < 10 then
htmlsrc = "<table id=fileinput"& nowfileinputno &"><tr><td> <input type=""text"" name=""text""></td><td><input type=""text"" name=""text""></td><td><input type=""text"" name=""text""></td><td><input type=""text"" name=""text""></td>"
htmlsrc = htmlsrc & "<td><input type=""text"" name=""text""><input type=button value=删除 class=cbutton onclick=""delfileinput("& nowfileinputno &")""></td></tr></table>"& vbcrlf
document.all.add_line.insertadjacenthtml "beforebegin", htmlsrc
nowfileinputno = nowfileinputno + 1
nowfileinputcount = nowfileinputcount + 1
else
alert "增加太多记录行"
end if
end sub
sub delfileinput(tableno)
document.all("fileinput"& tableno).outerhtml = ""
nowfileinputcount = nowfileinputcount – 1
end sub
</script>
