I am new to Javascript. So I had a doubt for the following function, how to display the error message next to text box? right now it is showing a alert message, but I need to change the alert message and need to display it next to textbox?
function AllowLock(){
if (!locker.lock.value.match(/[a-zA-Z]$/) && locker.lock.value !="") {
locker.lock.value="";
alert("Please Enter only valid lock");
}
if(locker.lock.value.length > 5)
alert("max length exceeded");
}
}