The first one:
<! DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01 transitional//en" "Http://www.w3.org/TR/html4/loose.dtd" > <ptml> <pead> <title>untitled document</title> <meta http-equiv= "Content-type" content=; charset=gb2312 "> <script language=" JavaScript > <!--function addinputfile (Spanid,fileid) { var span = document.getElementById (Spanid); if (span!=null) {if (Navigator.userAgent.indexOf ("msie") = = 1) {var fileobj = document . createelement ("input"); if (fileobj!= null) {fileobj.type= "file"; Fileobj.name = Fileid; Fileobj.id = Fileid; Fileobj.size= "50"; Span.appendchild (Fileobj); }//if fileobj fileobj = document.createelement ("BR"); if (fileobj!= null) {span.appendchild (fileobj); } else{var filetag = "<input type= ' filE ' id = ' "+ Fileid +" ' name= ' "+ Fileid +" ' size=50> "; var fileobj = document.createelement (Filetag); Span.appendchild (Fileobj); Filetag= ""; Fileobj = Document.createelement (Filetag); Span.appendchild (Fileobj); }//if span}//--> </script> </pead> <body> <form name= "Form1" Method= "POST" action= "" > <input type= "button" name= "button" value= "Add File" onclick= "Addinputfile (' fileName ', ' Bao Bao '); " > <span id= "fileName" ></span> </form> </body> </ptml>
[Ctrl + A All SELECT Note: If the need to introduce external JS need to refresh to perform]
The second one:
<textarea id="runcode21640"><script> function Deloption (e) {e.previoussibling.value= ""; E.previoussibling.removenode (); E.nextsibling.removenode (); E.removenode (); function AddOption (name) {var Newtextarea = document.createelement (' <textarea name= "qoption" ></textarea> ;') var Newbutton = document.createelement (' <input type= "button" onclick= "Deloption (This)" value= "delete" > "); var newbr = document.createelement (') var parentnode=document.all[name]; Parentnode.appendchild (Newtextarea); Parentnode.appendchild (Newbutton); Parentnode.appendchild (NEWBR); } </script> <input type= "button" onclick= "addoption (' option ')" value= "Add" > <span id= "option" ;</span></textarea>
[Ctrl + A All SELECT Note: If the need to introduce external JS need to refresh to perform]