Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js add html button

let btn = document.createElement("button");
btn.innerHTML = "Save";
btn.onclick = function () {
  alert("Button is clicked");
};
document.body.appendChild(btn);
Source by sebhastian.com #
 
PREVIOUS NEXT
Tagged: #js #add #html #button
ADD COMMENT
Topic
Name
5+7 =