'type' Example
<html> <body> <script language="JavaScript"> function function1(){ var newN = document.createElement("input"); newN.type = "text"; myForm.appendChild(newN); newN.innerText="Testing"; } </script> <form id="myForm"> <button onclick="function1();" type="button">Add Text Input</button> </form> </body> </html>