Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

create label dynamically in javascript

var newlabel = document.createElement("Label");
newlabel.setAttribute("for",id_from_input);
newlabel.innerHTML = "Here goes the text";
parentDiv.appendChild(newlabel);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #create #label #dynamically #javascript
ADD COMMENT
Topic
Name
1+7 =