For example, how would one pass data through the argument myvar
with the following code:
<script>
function test(myvar) {
alert('Testing: ' + myvar);
}
</script>
<div id="testDiv"> ... Text ... </div>
<script>
document.getElementById("testDiv").onclick = test;
</script>