var text6 = document.getElementById("text6").value;
var regularExpression1 = /^[1-9]?[0-9]{1}$|^100$/;
if (!text6.match(regularExpression1)){
alert("Please enter Valid Age");
return false;
}
年齡場的正則表達式此代碼不能正常工作我想在JavaScript
您正在嘗試使用**正則表達式**來驗證**整數**值? – Passerby
雅但是在數據庫中它的一個字符串 –
什麼是不工作?哪些測試用例失敗?你想驗證什麼? – akluth