Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

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);
}
Comment

PREVIOUS NEXT
Code Example
Javascript :: ease between 2 points 
Javascript :: react loop return 
Javascript :: javascript extract json from string 
Javascript :: use params in Class based component 
Javascript :: array intersection javascript es6 
Javascript :: yup oneof 
Javascript :: how to create instance of class in javascript 
Javascript :: getinitialprops to a hoc in next js 
Javascript :: canvas draw rect dashed 
Javascript :: pdf.js get current page number 
Javascript :: Play Audio Stream from Client 
Javascript :: js filter method 
Javascript :: symbol properties javascript 
Javascript :: how to alert in javascript 
Javascript :: ethers.js get time 
Javascript :: Flutter list of JSONs to Objects 
Javascript :: how to log bodyparser error 
Javascript :: generate string from regex javascript 
Javascript :: https request node.js output incomplete 
Javascript :: synchronous file read 
Javascript :: javascript max characters string function 
Javascript :: javascript switch syntax 
Javascript :: javascript remove everything after . 
Javascript :: .env file example react native 
Javascript :: datatable buttons bootstrap 4 
Javascript :: how to test usehistory in jest 
Javascript :: add pdf in react app 
Javascript :: reactjs facebook login popup trigger on load page 
Javascript :: how to link prototypes in js using call method 
Javascript :: how to fetch data from json file in flutter 
ADD CONTENT
Topic
Content
Source link
Name
8+8 =