js实现复制功能(文件上传)

来源:互联网 发布:沈阳关键词优化 编辑:程序博客网 时间:2024/04/29 15:41
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head>  <title> 支持IE浏览器以及IE8、不支持IE9 </title>  <meta charset="utf-8"/>  <meta name="Generator" content="EditPlus">  <meta name="Author" content="">  <meta name="Keywords" content="">  <meta name="Description" content="">  <script>   function fuck(){     alert("1");   var  uploadHTML = document.createElement("<input type='file' name='upload'/>");   document.getElementById("files").appendChild(uploadHTML);   uploadHTML=document.createElement("<p/>");   document.getElementById("files").appendChild(uploadHTML);      }  </script> </head> <body>   <input type="button"  onclick="fuck();" value="create"/>   <br/>   <form onsubmit="return true;" method="post" enctype="multipart/form-data">   <span id="files"><input type='file' name='upload'/>   <p/>   </span>    <input type="submit" value="开始上传"/>   </form> </body></html>