한국어
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <title>EMAIL检验</title> </head> <body> <SCRIPT LANGUAGE=" JavaScript"> <!-- function check() { if(document.register.email.value.length!=0) { if (document.register.email.value.charAt(0)=="." || 문서 .register.email.value.charAt(0)=="@"|| document.register.email.value.indexOf('@', 0) == -1 || document.register.email.value.indexOf( '.', 0) == -1 || document.register.email.value.lastIndexOf("@")==document.register.email.value.length-1 || (".")==document.register.email.value.length-1) { Alert("이메일은 유효하지 않습니다!"); document.register.email.focus(); 거짓을 반환; } } else { Alert("이메일을 보낼 수 없습니다!"); document.register.email.focus(); 거짓을 반환; } 거짓을 반환; } //--> </SCRIPT> <form name="register" method="POST" action onSubmit="return check();"> <p align="center"> 이메일:<input type="text" name="email" size="20"> <input type="submit" value="提交" name="B1"> <input type="reset" value="중복" name="B2"> </ p> </form> </body> </html>