Skip to content

Instantly share code, notes, and snippets.

@jhnlsn
Created August 31, 2012 16:52
Show Gist options
  • Save jhnlsn/3555766 to your computer and use it in GitHub Desktop.
Save jhnlsn/3555766 to your computer and use it in GitHub Desktop.
window.onload event binding
<html>
<head>
<script>
window.onload = function() {alert(1)}
window.onload = function() {alert(2)}
window.onload = function() {alert(3)}
function load() {
alert(4);
}
window.addEventListener("load", load, false);
</script>
</head>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment