


Programs in JavaScript
8. appendChild example.<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <script type="text/javascript"> function addmore() { e = document.createElement("input") e.type = "file" d = document.getElementById("div1") d.appendChild(e) br = document.createElement("br") d.appendChild(br) } </script> </head> <body> <input type="button" value="Add" onclick="addmore()" /> <div id="div1"> </div> </body> </html>Output :