<input type="text" value="" id="mm"/>
document.getElementById("mm").onblur=function(){
if(mm.value.length>=6&&mm.value.length<=10){
this.style.backgroundColor="green";
}
else{
this.style.backgroundColor="red";
}
};
hellocc 2019-07-25 11:29 原文