Javascript Form Validation

Form Validation

<script type="text/javascript">
function validateform(form1)
{
if("" == document.forms.form1.name.value)
{
alert("Please enter your name")
form1.name.focus()
return false
}
if("" == document.forms.form1.email.value)
{
alert("Please enter your email")
form1.email.focus()
return false
}
if("" == document.forms.form1.message.value)
{
alert("Please enter your message")
form1.message.focus()
return false
}
}
</script>

 function validateform(form1)
 {
  if("" == document.forms.form1.name.value)
  {
   alert("Please enter your name")
   form1.name.focus()
   return false
  }
  if("" == document.forms.form1.email.value)
  {
   alert("Please enter your email")
   form1.email.focus()
   return false
  }
  if("" == document.forms.form1.message.value)
  {
   alert("Please enter your message")
   form1.message.focus()
   return false
  }
 }
     

Name:*

 

Email:*

 

Message:*