Wednesday, 2 September 2015

javascript, How to create/add input and ohter html elements into webpage dynamically



var input = document.createElement("input");
input.type = "text";
input.className = "css-class-name"; // set the CSS class
document.body.appendChild(input); // put it into the DOM



http://www.w3schools.com/jsref/met_node_appendchild.asp

http://www.w3schools.com/jsref/met_document_createelement.asp


No comments:

Post a comment