I have a form with one textbox. I want to check when the textbox value is empty and make some sort of red border surrounding the textbox itself when it’s empty.
if (document.getElementById('pageh').value == "") {
alert("One of the fields is empty.");
return false;
}
That’s my validation, but how do I add the red border?
1 Answer