crop_rotate
Run
<!DOCTYPE html> <html> <head> <title>createElement JavaScript</title> </head> <body> <button type="button" id="button">Create Element</button> <script> let button = document.getElementById('button'); button.addEventListener("click",()=>{ // 1- Get Body Object let myBody = document.body; // 2- Update Body HTML Content // 3- Create Element in body Content append myBody.innerHTML += "<h1>Welcome To CloseTag.com<h1>"; }); </script> </body> </html>
PCFET0NUWVBFIGh0bWw+DQo8aHRtbD4NCjxoZWFkPg0KPHRpdGxlPmNyZWF0ZUVsZW1lbnQgSmF2YVNjcmlwdDwvdGl0bGU+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPiA6Oi13ZWJraXQtc2Nyb2xsYmFye3dpZHRoOjdweDtoZWlnaHQ6N3B4O306Oi13ZWJraXQtc2Nyb2xsYmFyLXRyYWNre2JhY2tncm91bmQ6I2ZmZjt9Ojotd2Via2l0LXNjcm9sbGJhci10aHVtYntib3JkZXItcmFkaXVzOjVweDtiYWNrZ3JvdW5kOiMyZjQ1ZmY7fTwvc3R5bGU+PC9oZWFkPg0KPGJvZHk+DQogICA8YnV0dG9uIHR5cGU9ImJ1dHRvbiIgaWQ9ImJ1dHRvbiI+Q3JlYXRlIEVsZW1lbnQ8L2J1dHRvbj4NCiAgICA8c2NyaXB0Pg0KICAgIGxldCBidXR0b24gPSBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgnYnV0dG9uJyk7DQogICAgYnV0dG9uLmFkZEV2ZW50TGlzdGVuZXIoImNsaWNrIiwoKT0+ew0KICAgICAgLy8gMS0gR2V0IEJvZHkgT2JqZWN0DQogICAgICBsZXQgbXlCb2R5ID0gZG9jdW1lbnQuYm9keTsNCiAgICAgIC8vIDItIFVwZGF0ZSBCb2R5IEhUTUwgQ29udGVudA0KICAgICAgLy8gMy0gQ3JlYXRlIEVsZW1lbnQgaW4gYm9keSBDb250ZW50IGFwcGVuZA0KICAgICAgbXlCb2R5LmlubmVySFRNTCArPSAiPGgxPldlbGNvbWUgVG8gQ2xvc2VUYWcuY29tPGgxPiI7DQogICAgfSk7DQogICAgDQogICAgPC9zY3JpcHQ+DQo8L2JvZHk+DQo8L2h0bWw+