Answers for "js user add names to a list on screen"

0

js user add names to a list on screen

document.getElementById("add").onclick  = function() {

    var node = document.createElement("Li");
    var text = document.getElementById("user_input").value; 
    var textnode=document.createTextNode(text);
    node.appendChild(textnode);
    document.getElementById("list_item").appendChild(node);
}
Posted by: Guest on December-23-2020

Code answers related to "js user add names to a list on screen"

Code answers related to "Javascript"

Browse Popular Code Answers by Language