![]() | Example | ![]() |
---|
This example validates a TextField as containing numeric characters only
<script> function validate(obj) { value = obj.value; for (n = 0; n < value.length; n++) if ( ! isDigit(value.charAt(n))) { alert("Field must be alphabetic"); return; } } </script> <input type="text" onChange="validate(this)">
Slide 18 | ©Copyright 1996 Jan Newmarch | INT4 |