Last active
June 30, 2019 02:36
-
-
Save awave1/a69f160438d26fa98870e098b1e16243 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<body> | |
<button id="btn">show answers</button> | |
<script> | |
var btn = document.getElementById('btn'); | |
var body = document.body; | |
btn.onclick = function (event) { | |
body.insertAdjacentHtml('afterend', '<p>some paragraph</p>'); | |
}; | |
</script> | |
</body> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://developer.mozilla.org/en-US/docs/Web/API/Element/
https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onclick