input输⼊框正则验证全是数字且只能输⼊⼤于1⼩于90的数字html-------
<div class="validity_input">
<input type="t特别的你作文
ext" class="videoDay" fasion
value={{queryList}} nkeyup="value=valu生产线英语
e.replace(/[^\d]/g,'')"placeholder="有效期1-90天" maxlength="2">
<div class="validity_color">天</div>
</div>
&田七牙膏
lt;span class="hintMessagedata">请输⼊1-90以内的数字</span>
js----------
// 获取焦点
$(".videoD霸气英文单词
ay").focus(function(){
$(this).parent().siblings(".hintMessagedata").show();
});
$(".videoDay").blur(function(){
$(this).parent().siblings(".hintMessagedata").hide();
var otherPrice =$('.videoDay').val();
if(otherPrice<=0){
$('.videoDay').val('1')
}el if(otherPrice>=90){
$('.videoDay').val('90')
}
if(otherPrice.charAt(0) =="0"){
$('.videoDay').val('1')
}
});
css--------
.hintMessagedata {
display: none;
position: 怎么做蔬菜沙拉
absolute;
top:-34px;
left: 24%;
z-index: 999;
width: 315px;
height: 28px;
color: #0099ff;
background: #fff;
text-alig包振玉
n: center;
line-height: 28px;
font-size: 12px;
border: 1px solid #ccc;
opacity: 0.9;
filter: alpha(opacity=90);
}
----------------
验证全是数字的正则replace(/[^\d]/g,'')