'이메일 유효성 검사'에 해당되는 글 1건

  1. Email 도메인검사

Email 도메인검사


<html>
<head>
<script type="text/javascript">
function validateForm()
{
var email=document.getElementById("email2").value;
var dotpos=email.lastIndexOf(".");
if (dotpos<1 || dotpos+1>=email.length)
  {
  alert("Not avilable domain.");
  return false;
  }
}
</script>
</head>


------------------------------------------------------------------------------------

<body>
<form name="myForm" action="demo_form.asp" onsubmit="return validateForm();" method="post">
E-MAIL <input type="text" name="email" id="email2">
<input type="submit" value="Submit">
</form>
</body>

</html>