I\'m doing form validation. when the form input is incorrect i add a red border to the textbox:
document.getElementById(\"fName\").style.borderColor=\"#FF000
If the users enter an incorrect value, apply a 1px red color border to the input field:
document.getElementById('fName').style.border ="1px solid red";
If the user enters a correct value, remove the border from the input field:
document.getElementById('fName').style.border ="";