jqueryは入力数字が11ビットであるか否かの判断を実現する
1417 ワード
2.html
function sd(){
$("#isnum").val("");
};
function ischeckNum()
{
var num = document.getElementById('isnum').value;// id
if( num )
{
if( !isNaN( num ) )
{
if(num.length>11){
sd();
alert(" 11 , 11 ");
}else if(num.length<11 && num.length>0){
sd();
alert(" 11 , 11 !");
}
return false;
}
else
{
alert(' ');
sd();
return false;
}
}
else
{
alert(' ');
}
}