Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
<!DOCTYPE html>
<button id="hellobutton">Hello</button>
document.getElementById('hellobutton').onclick = function() {
alert('Welcome to the future!'); // Show a dialog
var myTextNode = document.createTextNode('Some new words.');
document.body.appendChild(myTextNode); // Append "Some new words" to the page
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.