<html>
<head>
<script language="javascript">
function formCheck()
{
if (document.theform.user_name.value == "")
{
alert("Please put in a name.");
return false;
}
if (document.theform.email.value.indexOf("@") == -1 ||
document.theform.email.value == "")
{
alert("Please include a proper email address.");
return false;
}
}
</script>
</head>
<body>
<FORM NAME = "theform" ACTION = "mailto:" METHOD = "POST" ENCTYPE = "multipart/form-data"
onSubmit="return formCheck()">
name
<input type="text" name="user_name" value="dd">
email
<input type="text" name="email" value="dddd">
<input type="submit" value="ok" onClick="formCheck()">
</form>
</body>
</html>
posted on 2006-05-08 16:54
happytian 阅读(303)
评论(1) 编辑 收藏