Skip to content

Instantly share code, notes, and snippets.

@tmcw
Created February 26, 2013 17:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save tmcw/5040354 to your computer and use it in GitHub Desktop.
Save tmcw/5040354 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<title></title>
<link rel='stylesheet' type='text/css' href='' />
<meta http-equiv='content-type' content='text/html; charset=utf-8' />
</head>
<body>
<button id='foo'>foo!</button>
<script>
var foo = document.getElementById('foo');
foo.onclick = function() {
foo.innerHTML = 'hello, serge!';
window.setTimeout(function() {
foo.innerHTML = 'bye!';
}, 3000);
};
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment