密码长度为6-10的判断

<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";
}
};
原文地址:https://www.cnblogs.com/hellocc/p/11243123.html