<html>
<head>
<title> Requiring an Entry</title>
<script language="javascript" type="text/javascript">
function fieldCheck(myfield) {
if (myfield.value=="") {
alert(" you must enter data here")
myfield.focus() //
place cursor in the field
}
}
</script>
</head>
<body bgcolor="white" >
<form >
<h3>
Email Address :
<input type="text" onBlur="fieldCheck(this)">
// call function when user leave this field
<br><br>
Name (optional): <input type="text">
</form>
</h3>
</body>
</html>