1. Home
  2. Computing & Technology
  3. JavaScript
Answers to frequently asked questions on how you can use events in Javascript.
Disabling the Default Action
There are a number of objects on a web page that have their own default action attached that will be performed when your visitors interact with that object (eg. by clicking a link or submitting a form). When you attach Javascript processing to those objects there will be times when you don't want that default action to occur. You can use Javascript to turn off that default action.
Print Directly to Printer
An explanation of some of the reasons why Javascript can't print a page without the print dialog popping up.
Mouse Cursor Position
Determine the position of the mouse cursor within the web page when an event is triggered.
setTimeout or setInterval
What exactly is the difference between setTimeout and setInterval?
Print Button
Add a button or link to your page to make it easier for your visitors to print the page. A simple addition to your stylesheets can even set things up so that only selected parts of your page are actually printed.
Using window.onload
The onload global event handler is an alternative to placing the onload attribute in the body tag. Here is how you change your code to use it.

Explore JavaScript

More from About.com

  1. Home
  2. Computing & Technology
  3. JavaScript
  4. Controls and Widgets
  5. Events

©2008 About.com, a part of The New York Times Company.

All rights reserved.