You can't just ignore invalid input by the user. Validation can be done either at client side or at server side. But with client side scripting, you can verify the input as quickly as possible without causing precious trips to the server. Truncating Real Numbers Use regular expressions to solve the problem of truncating decimal numbers on web pages. You can use this technique to show the result of a division upto two decimal places, etc.
Arguments Learn how to write functions that accept multiple arguments.
With JavaScript, you can call such functions with variable number of arguments. This week's article gives you an insight in a straight and simple manner into the event object and teaches you how you can use it in your pages. We will develop a page that opens up a new window and displays a help message whenever the user presses F2 key. The Event Object Continuing with the theme picked up in the last article, today we will see how to declare default event handlers. Along with that we will also see the event object .