adding a button in javascript
// The code below should help
let btn = document.createElement("button");
btn.innerHTML = "Submit";
btn.type = "submit";
btn.name = "formBtn";
document.body.appendChild(btn);
adding a button in javascript
// The code below should help
let btn = document.createElement("button");
btn.innerHTML = "Submit";
btn.type = "submit";
btn.name = "formBtn";
document.body.appendChild(btn);
javascript add button to div
// get the element you want to add the button to
var myDiv = document.getElementById("demo");
// create the button object and add the text to it
var button = document.createElement("BUTTON");
button.innerHTML = "Button";
// add the button to the div
myDiv.appendChild(button);
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us