now i got a problem of javascript if sentence i want to get a result of all the 3 if sentence(each if sentence's value is different)
i have 3 input box(type="text") and one textarea(for result) in html file : email, date, SSN. and i have to use regExp for matching each value. i've done... and now i have to show matching result in textarea but i can see just one result like...
if (rgEx1.test(document.getElementById("email").value)) {
document.getElementById("result").innerHTML = "e-mail matched";
}
if (rgEx2.test(document.getElementById("date").value)) {
document.getElementById("result").innerHTML = "date matched";
}
if (rgEx3.test(document.getElementById("ssn").value)) {
document.getElementById("result").innerHTML = "SSN matched";
}
with this sentence i can see only ssn matched but i want to see each if sentences' result then what should i do????
Aucun commentaire:
Enregistrer un commentaire