By Alvin Alexander. Last updated: June 4, 2016
Here's some JavaScript code I found today while poking around the net. Embed this JavaScript code in a web page, and a user can simply double-click anywhere on the page to automatically move back to the beginning of the page. Pretty cool idea. Here's the code:
<script language="JavaScript1.2"
type="text/javascript">
<!--
function dblclick()
{
window.scrollTo(0,0)
}
if (document.layers)
{
document.captureEvents(ONDBLCLICK);
}
document.ondblclick=dblclick;
-->
</script>

