<html>
<head>
<script language="
javascript">
function addFile() {
var fileDiv = document.all['fileDiv'];
var strHtml = '<span><input type="file" /> <button onclick="removeFile(parentNode);">删除</button><br></span>';
fileDiv.innerHTML += strHtml;
} www.jb200.com
function removeFile(obj) {
obj.removeNode(true);
}
</script>
</head>
<body>
<form enctype="multipart/form-data">
<div id="fileDiv">js实现多附件上传</div>
<a href="javascript:void(addFile());" class="file">添加附件</a>
</form>
</body>
</html>