input输⼊框正则验证全是数字且只能输⼊⼤于1⼩于90的数字html-------
<div class="validity_input">
<input type="text" class="videoDay" value={{que参加的英文短语
ryList}} nkeyup="place(/[^\d]/g,'')"placeholder="有效期1-90天" maxlength="2">
<div class="validity_color">天</div>
</div>
<span class="hintMessagedata">请输⼊1-90以内的数字&l用心一也
t;/span>
js----------
// 获取焦点
$(".videoDay").focus(function(){
$(this).parent().siblings(".hintMessagedata").show();
});
$(".videoDay").blur(function(){
$(this).parent().siblings(".hintMessagedata").hide();
var otherPrice =$('.videoDay').val();
i花生炖猪蹄
f(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-align: center;
line-height: 28px;
font-size: 12px;
border: 1px solid #ccc;
opacity: 0.9;
filter: alpha(opacity=90);
}
------炸肉丸子的家常做法
---------英文慢摇
-
验证全是数字的正则replac最美青工
e(/[^\d]/g,祥瑞的成语
'')