create textbox using javascript 1

create textbox using javascript

var textBox = document. createElement("INPUT"); 
textBox. setAttribute( "type","text");
document.body.appendChild(textBox);

Here is what the above code is Doing:
1. Create a new element of type “INPUT”
2. Set the type attribute of the element to “text”
3. Add the element to the document

Similar Posts