JS:大於0小於60的數字表單的驗證
功能?獲取2(n){
回歸?/^([1-6])?[1-9]$/.測試(n);
}
document . writeln(getz 2(6));
document . writeln(getz 2("-a6 ");
document . writeln(getz 2(0.5));
document . writeln(getz 2(" asdfs "));
回歸?/^([1-6])?[1-9]$/.測試(n);
}
document . writeln(getz 2(6));
document . writeln(getz 2("-a6 ");
document . writeln(getz 2(0.5));
document . writeln(getz 2(" asdfs "));