<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>New Document</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content="MSHTML 6.00.2900.2995" name=GENERATOR>
<META content="" name=Author>
<META content="" name=Keywords>
<META content="" name=Description>
<SCRIPT>
function addFile() {
var fileDiv = document.all['fileDiv'];
var strHtml = '<span><input type="file" class=xh> <button οnclick="removeFile(parentNode);">删除</button><br></span>';
fileDiv.innerHTML += strHtml;
}
function removeFile(obj) {
obj.removeNode(true);
}
</SCRIPT>
</HEAD>
<BODY>
<TABLE id="fileTb" border=1>
<td >
附件
</td>
<td >
<a href="javascript:void(addFile());" class="file">添加附件</a><br>
<INPUT type="file" name="upfile" contentEditable="false" class=xh maxLength=200 size=20>
<div id="fileDiv"></div>
</td>
</TABLE>
</BODY>
</HTML>
js添加附件默认有一个
最新推荐文章于 2024-08-13 22:07:58 发布