crop_rotate
Run
<!DOCTYPE html> <html> <head> <title>createElement JavaScript</title> </head> <body> <h1 id="apple" class="memory">Welcome To CloseTag.com</h1> <p id="p"> class name now is memory</p> <button type="button" id="button">Remove attribute</button> <script> let apple = document.getElementById('apple'); let button = document.getElementById('button'); let p = document.getElementById('p'); button.addEventListener("click",()=>{ apple.removeAttribute("class"); p.innerText = "class name now is " + p.getAttribute("class"); }); </script> </body> </html>
PCFET0NUWVBFIGh0bWw+DQo8aHRtbD4NCjxoZWFkPg0KPHRpdGxlPmNyZWF0ZUVsZW1lbnQgSmF2YVNjcmlwdDwvdGl0bGU+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPiA6Oi13ZWJraXQtc2Nyb2xsYmFye3dpZHRoOjdweDtoZWlnaHQ6N3B4O306Oi13ZWJraXQtc2Nyb2xsYmFyLXRyYWNre2JhY2tncm91bmQ6I2ZmZjt9Ojotd2Via2l0LXNjcm9sbGJhci10aHVtYntib3JkZXItcmFkaXVzOjVweDtiYWNrZ3JvdW5kOiMyZjQ1ZmY7fTwvc3R5bGU+PC9oZWFkPg0KPGJvZHk+DQogICA8aDEgaWQ9ImFwcGxlIiBjbGFzcz0ibWVtb3J5Ij5XZWxjb21lIFRvIENsb3NlVGFnLmNvbTwvaDE+DQogIDxwIGlkPSJwIj4gY2xhc3MgbmFtZSBub3cgaXMgIG1lbW9yeTwvcD4NCiAgIDxidXR0b24gdHlwZT0iYnV0dG9uIiBpZD0iYnV0dG9uIj5SZW1vdmUgYXR0cmlidXRlPC9idXR0b24+DQogICAgPHNjcmlwdD4NCiAgICBsZXQgYXBwbGUgPSBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgnYXBwbGUnKTsNCiAgICBsZXQgYnV0dG9uID0gZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoJ2J1dHRvbicpOw0KICAgIGxldCBwID0gZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoJ3AnKTsNCiAgICBidXR0b24uYWRkRXZlbn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