Validation Of Form Data

[Total: 0    Average: 0/5]

This script does a simple vaildation of a textbox.

Body Code:

<script>
function validate(check)
{
  if(check.textbox.value=="")
  {
    alert("Please enter your value");
    check.textbox.focus();
    return(false);
  }
}
</script>
<form>
<input type=text name=textbox value="">
<input type=button onclick=validate(this.form) value=Validate>
</form>

Times Viewed: 1

Leave a Reply

Your email address will not be published. Required fields are marked *