Home / Free JavaScripts / Form Validation / Here

Website Abstraction

Cut & Paste Check if its a number (Require NS 4.x or IE 4.x)

Credit: Website Abstraction

Description: This script checks the contents of a form box to ensure that its a number (updated to accept demicals). If not, the submission of the form is canceled, and the surfer prompted to re-enter a valid number. This script requires NS 4.x or IE 4.x to function-all other browsers will simply not participate in the number checking.

Example:

Please enter a number:

Directions: Simply cut and paste the below code into the <body> section of your page. It
contains a form with one box that is checked for "number validity". You can add in more form elements into the form, as you would with any other form.



spacer.gif (810 bytes)

.
CopyRight © 1997-2001 Website Abstraction. All rights reserved


spacer.gif (810 bytes)