adding a button in javascript

Solutions on MaxInterview for adding a button in javascript by the best coders in the world

showing results for - "adding a button in javascript"
Luis
28 Aug 2019
1// The code below should help
2let btn = document.createElement("button");
3btn.innerHTML = "Submit";
4btn.type = "submit";
5btn.name = "formBtn";
6document.body.appendChild(btn);
7