Skip to content

Instantly share code, notes, and snippets.

@martenlienen
Created November 8, 2011 09:31
Show Gist options
  • Save martenlienen/1347359 to your computer and use it in GitHub Desktop.
Save martenlienen/1347359 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript">
window.onload = function () {
var x = document.getElementById("x");
var y = document.getElementById("y");
x.addEventListener("click", function(e){alert("y0");}, false);
};
</script>
</head>
<body>
<div id="x" style="width:100px;height:100px">
<div id="y" style="width:100px;height:100px">
<input type="button" value="cl1ck me" />
</div>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment