开发者

how to check for null and non-number data enterd(like characters or special char)in to text box by using java script?

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 numb开发者_如何转开发er but not text and should not be empty , any help pls?


Try this:

isNaN(yourText.value)

return true if its Not a Number


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜