'type' Example : type « Node Operation « JavaScript DHTML
- JavaScript DHTML
- Node Operation
- type
'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>
Related examples in the same category