11.12.2012 Views

JavaScript 2.0-The Complete Reference, Second ... - freecodingtutorial

JavaScript 2.0-The Complete Reference, Second ... - freecodingtutorial

JavaScript 2.0-The Complete Reference, Second ... - freecodingtutorial

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

{<br />

}<br />

var theForm = document.mouseform;<br />

theForm.altkey.value = event.altKey;<br />

theForm.controlkey.value = event.ctrlKey;<br />

theForm.shiftkey.value = event.shiftKey;<br />

theForm.metakey.value = event.metaKey;<br />

theForm.clientx.value = event.clientX;<br />

theForm.clienty.value = event.clientY;<br />

theForm.screenx.value = event.screenX;<br />

theForm.screeny.value = event.screenY;<br />

if (event.button == 0)<br />

theForm.buttonused.value = "left";<br />

else if (event.button == 1)<br />

else<br />

theForm.buttonused.value = "middle";<br />

theForm.buttonused.value = "right";<br />

document.addEventListener("click", showMouseDetails, true);<br />

//-->><br />

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!