You are on page 1of 1

<html>

<head>
<script>
function validateForm()
{
var x=document.forms["myForm"]["fname"].value;
if (x==null || x=="")
{
alert("First name must be filled out");
return false;
}
}
</script>
</head>
<body>
<form name="myForm" action="demo_form.asp" onsubmit="return validateForm()" meth
od="post">
Quickcode: <input type="text" name="qname">
<input type="submit" value="Submit">
</form>
</body>
</html>

You might also like