|
»ç¿ëÀÚ E-mailÁÖ¼Ò¸¦ ½ºÅ©¸³Æ®·Î °ËÁõÇϱâ
¢º »ç¿ëÀÚ E-mail °ËÁõÇÏ°í ¿¡·¯¸Þ¼¼Áö ¶ç¿ì±â
<html>
<head>
<script language="JavaScript">
function isEmail(str) {
// regular expression Áö¿ø ¿©ºÎ Á¡°Ë
var supported = 0;
if (window.RegExp) {
var tempStr = "a";
var tempReg = new RegExp(tempStr);
if (tempReg.test(tempStr)) supported = 1;
}
if (!supported)
return (str.indexOf(".") > 2) &&
(str.indexOf("@") > 0);
var r1 = new RegExp("(@.*@)|(\\.\\.)|(@\\.)|(^\\.)");
var r2 = new RegExp("^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,3}|[0-9]{1,3})(\\]?)$");
return (!r1.test(str) && r2.test(str));
}
</script>
</head>
<body>
<FORM NAME="emailCheck">
<INPUT TYPE="text" NAME="email"
SIZE="30">
<INPUT TYPE="button" NAME="sub"
VALUE="À̸ÞÀÏ °ËÁõ" ONCLICK="isEmail(document.emailCheck.email.value)?alert('µî·ÏÇØÁּż
°¨»çÇÕ´Ï´Ù.'):alert('¿Ã¹Ù¸¥ ¸ÞÀÏÁÖ¼Ò¸¦ ÀÔ·ÂÇØÁÖ¼¼¿ä.')">
</FORM>
</body>
</html> |
¢º »ç¿ëÀÚ E-mail,
ÇѸÞÀÏ(daum)°èÁ¤ÀÇ ¸ÞÀÏ °ËÁõÇÏ°í ¿¡·¯¸Þ¼¼Áö ¶ç¿ì±â
<html>
<head>
<script language="JavaScript">
<!--
function sendit()
{
var str;
str = document.myform.email.value;
if(str == ""){
alert("E-mailÀ» µî·ÏÇØ ÁÖ¼¼¿ä");
document.myform.email.value = "";
document.myform.email.focus();
return;
}
if(str.search(/(\S+)@(\S+)\.(\S+)/) == -1 ){
alert("E-mail ÁÖ¼Ò°¡ ºÎÁ¤È®ÇÕ´Ï´Ù.");
document.myform.email.value = "";
document.myform.email.focus();
return;
} if ((str.indexOf('@daum.net')
!= -1) || (str.indexOf('@hanmail.net') != -1)){
alert("daum(hanmail)°èÁ¤ÀÇ À̸ÞÀÏÀº µî·ÏÇÒ ¼ö ¾ø½À´Ï´Ù.");
document.myform.email.value = "";
document.myform.email.focus();
return;
}
document.myform.submit();
}
//-->
</script>
</head>
<body>
<form name=myform action="" style="margin-top=0;margin-bottom:3;"
methed=post>
<input type="text" name="email"
size="18" >
<a href="javascript:sendit();">µî·ÏÇϱâ</a>
</body>
</html>
|
¢º »ç¿ëÀÚ E-mail¿¡
¸ÞÀÏ°èÁ¤ ¿É¼Ç ÁÖ±â
<html>
<head>
<script language="JavaScript">
function check_validation()
{
form = document.input_form;
if ( ! check_string_value(form.email1.value, 2) || form.email1.value.indexOf("
", 1) != -1 )
{
alert('E-Mail ÁÖ¼Ò¸¦ ¿Ã¹Ù¸£°Ô ÀÔ·ÂÇϽʽÿä.');
form.email1.focus();
return false;
}
if ( ! check_string_value(form.email2.value, 4) || form.email2.value.indexOf(".",
2) == -1 )
{
alert('E-Mail ÁÖ¼Ò¸¦ ¿Ã¹Ù¸£°Ô ÀÔ·ÂÇϽʽÿä.');
form.email2.focus();
return false;
}
if ( form.email2.value.toLowerCase() == "hanmail.net"
|| form.email2.value.toLowerCase() == "daum.net")
{
alert('´ÙÀ½ °èÁ¤(hanmail.net, daum.net)Àº »ç¿ëÇÏ½Ç ¼ö ¾ø½À´Ï´Ù.');
form.email2.focus();
return false;
}
return false;
}
function change_email()
{
form = document.input_form;
val = form.email_list.options[form.email_list.selectedIndex].value;
if ( val == "" )
{
form.email2.value = "";
form.email2.disabled = true;
form.email2.onClick = "blur();"
}
else if ( val == "direct" )
{
form.email2.value = "";
form.email2.disabled = false;
form.email2.focus();
}
else
{
form.email2.value = val;
form.email2.disabled = true;
}
}
// -->
</script> </head> <body>
<form id=Form1 name=input_form onsubmit="return
check_validation();"
action=bloom_join_process.asp method=post autocomplete="off">
<INPUT id=Hidden1 type=hidden name=email> <INPUT
id=Text5 maxLength=50 name=email1> @ <INPUT
id=Text6 disabled maxLength=50 size=14 name=email2>
<SELECT class=input id=Select1 onchange=change_email();
name=email_list> <OPTION value=""
selected>¼±ÅÃ</OPTION> <OPTION value=lycos.co.kr>lycos.co.kr</OPTION>
<OPTION value=yahoo.co.kr>yahoo.co.kr</OPTION>
<OPTION value=hanmir.com>hanmir.com</OPTION>
<OPTION value=netian.com>netian.com</OPTION>
<OPTION value=korea.com>korea.com</OPTION>
<OPTION value=hotmail.com>hotmail.com</OPTION>
<OPTION value=dreamwiz.com>dreamwiz.com</OPTION>
<OPTION value=empal.com>empal.com</OPTION>
<OPTION value=intizen.com>intizen.com</OPTION>
<OPTION value=orgio.net>orgio.net</OPTION>
<OPTION value=direct>Á÷Á¢ÀÔ·Â</OPTION>
</SELECT> <BR>´ÙÀ½ °èÁ¤(hanmail.net,daum.net)Àº
»ç¿ëÇÒ ¼ö ¾ø½À´Ï´Ù.
</form> </body> </html>
|
|
|
|
|