Skip to content

Instantly share code, notes, and snippets.

@ericpkatz
Created April 30, 2021 19:44
Show Gist options
  • Save ericpkatz/fda6655eb80e2fbc978b06753d1ea222 to your computer and use it in GitHub Desktop.
Save ericpkatz/fda6655eb80e2fbc978b06753d1ea222 to your computer and use it in GitHub Desktop.
// source https://jsbin.com
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<h1>Hello World</h1>
<script id="jsbin-javascript">
document.querySelector('h1').addEventListener('click', (ev)=> {
ev.target.innerText = Math.random();
})
</script>
<script id="jsbin-source-javascript" type="text/javascript">document.querySelector('h1').addEventListener('click', (ev)=> {
ev.target.innerText = Math.random();
})</script></body>
</html>
document.querySelector('h1').addEventListener('click', (ev)=> {
ev.target.innerText = Math.random();
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment