<!DOCTYPE html>id="demo"Click the button to make a BUTTON element with text.onclick="myFunction()"Try itfunction myFunction(){var btn=document.createElement("BUTTON");var t=document.createTextNode("CLICK ME");btn.appendChild(t);document.body.appendChild(btn);};