正文

Textbox Validation

(2007-10-24 20:22:56) 下一个



<............onKeyDown="var lilKey=event.keyCode; if(lilKey==48){return true} else if(lilKey >=49&&lilKey<=57){return true}else{alert('Numbers only!');return false;}">





Drag a textbox onto aspx page, copy and paste onKeyDown event. This will validate your input to the textbox and only numbers can be entered into the textbox not characters. Try it.
















[ 打印 ]
阅读 ()评论 (0)
评论
目前还没有任何评论
登录后才可评论.