-3

hi i have a page having text box. in that i should not allow user to go to next page unless he enters some NUMBER. it should number but not text and should not be empty , any help pls?

Suresh
  • 38,717
  • 16
  • 62
  • 66

2 Answers2

4

Try this:

isNaN(yourText.value)

return true if its Not a Number

Rubens Farias
  • 57,174
  • 8
  • 131
  • 162
0

The title references checking for null, so you might also want to look at the null object in javascript.

Community
  • 1
  • 1
Michael Paulukonis
  • 9,020
  • 5
  • 48
  • 68