<script>
function email_chk(){
var stremail = document.form.email;
var stremail2 = document.form.email2;
var mail = stremail.value + "@" + stremail2.value;
var t = escape(mail);
if(t.match(/^(\w+)@(\w+)[.](\w+)$/ig) == null && t.match(/^(\w+)@(\w+)[.](\w+)[.](\w+)$/ig) == null){
alert("이메일을 올바르게 입력해 주세요.");
document.form.email.focus();
return;
} else {
alert("올바른 이메일입니다.");
return;
}
}
</script>
<body>
<form name="form">
<input type="text" name="email"> @ <input type="text" name="email2">
<input type="button" value=" 체크 " onclick="javascript
</body>
댓글 없음:
댓글 쓰기