上传

<div id="files">
<div>
<input type=button onclick="add();" value=Attacthment>


<script>
var html="<input name=title  type=file> <input type=button value=Delete onclick=\"remove(this)\">";
function add()
{
var o=document.all["files"];
var div=document.createElement("div");
div.innerHTML=html;
o.appendChild(div);
div.childNodes[0].click();
}
function remove(obj)
{
obj.parentElement.parentElement.removeChild(obj.parentElement);
}
</script>

 

posted on 2008-06-12 17:22  freexiaoyu  阅读(262)  评论(0编辑  收藏  举报