开发者

max marks validation

i have some problem in javascript validation..开发者_运维百科. My requirement is user sholud enter value in text box less than 5 he sholud not allow to enter value which is more than 5 he can enter 4.25 3.10 he should not enter 5.1 how to restrict user not to do this.. what is code for this.on which event we sholud call it


you can use onBlur event of textbox and then use

if(parseFloat(yourValue)<=limit)

Also you can use isNaN(yourValue) to check if it is a number.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜