#javascript-code-14-addEvent.js / js
// Wait for the page to finish loading addEvent( window, “load”, function(){ // Watch for any keypresses done by the user addEvent( document.body, “keypress”, function(e){ // If the user hits the Spacebar + Ctrl key if ( e.keyCode == 32 && e.ctrlKey ) { // Display our special form this.getElementsByTagName(“form”)[0].style.display = ‘block’; // Make sure that nothing strange happens e.preventDefault(); } }); });
(C) Æliens 20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.