Now here's something that I thought was basic and simple to do...

Code JavaScript:
<script type="text/javascript">
	document.body.onclick = alert('test');
</script>

...I put that just before my close body tag, thinking that from now an anytime I clicked on my page I'd see an alert saying "test".

What actually happens, though, is when the page loads the alert pops up and nothing happens afterward.

The clicks are just ignored.

Also there are no javascript errors coming up so I don't know what's the cause of the problem.

Why wouldn't this work ??