Nea*_*eal 19
试试这个:
if(parseInt($("selector").val()) > 99) {
/*if it is*/
}
Run Code Online (Sandbox Code Playgroud)
或者如果您在更改时检查它:
$("selector").change(function(){
if(parseInt(this.value) > 99){
/*if it is*/
}
})
Run Code Online (Sandbox Code Playgroud)
如下面的评论所述进行编辑,最好使用parseFloat而不是parseInt比较数字
| 归档时间: |
|
| 查看次数: |
26974 次 |
| 最近记录: |