ํฐ์คํ ๋ฆฌ ๋ทฐ
function email_chk(email)
{
var t = email.value
var ValidFlag = false
var atCount = 0
var SpecialFlag
var atLoop
var atChr
var BadFlag
var tAry1
var UserName
var DomainName
if ( t.length > 0 && t.indexOf("@") > 0 && t.indexOf(".") > 0 ) {
atCount = 0
SpecialFlag = false
for( atLoop=1; atLoop<=t.length; atLoop++ ) {
atChr = t.substring( atLoop, atLoop+1 )
if ( atChr == "@" ) atCount = atCount + 1
if ( (atChr >= 32) && (atChr <= 44) ) SpecialFlag = true
if ( (atChr == 47) || (atChr == 96) || (atChr >= 123) ) SpecialFlag = true
if ( (atChr >= 58) && (atChr <= 63) ) SpecialFlag = true
if ( (atChr >= 91) && (atChr <= 94) ) SpecialFlag = true
}
if ( ( atCount == 1 ) && (SpecialFlag == false ) ) {
BadFlag = false
tAry1 = t.split("@")
UserName = tAry1[0]
DomainName = tAry1[1]
if ( (UserName.length <= 0 ) || (DomainName.length <= 0 ) ) BadFlag = true
if ( DomainName.substring( 1, 2 ) == "." ) BadFlag = true
if ( DomainName.substring( DomainName.length-1, DomainName.length) == "." ) BadFlag = true
ValidFlag = true
}
}
if ( BadFlag == true ) ValidFlag = false
return ValidFlag
}
---------------------------------------------------------------------------------------
function go_step(){
var f = document.Form1;
if(f.toName.value == ""){
alert("๋ฐ๋ ๋ถ์ ์ด๋ฆ์ ์
๋ ฅํ์ธ์!");
f.toName.focus();
return;
}
if(f.toEmail.value == ""){
alert("๋ฐ๋ ๋ถ์ ์ด๋ฉ์ผ์ ์
๋ ฅํ์ธ์!");
f.toEmail.focus();
return;
}
if(MailCheck(f.toEmail.value)==false){
alert("์ด๋ฉ์ผ์ ํ์ธํ์ธ์!");
f.toEmail.select();
return;
}
//์ด๋ฉ์ผ ์ ํจ์ฑ ์ฒดํฌ
f.submit();
}
function MailCheck(ObjMail)
{
if (ObjMail.search(/^\s*[\w\~\-\.]+\@[\w\~\-]+(\.[\w\~\-]+)+\s*$/g) == -1 )
{
return false;
}
return true;
}
'JS' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
ํ ์คํธ ์ฐพ๊ธฐ createTextRange(); (0) | 2008.06.19 |
---|---|
๋์์ ๋์ฐ๊ธฐ (0) | 2008.04.29 |
splitํจ์ (0) | 2008.03.17 |
Table width๊ฐ ๊ณ ์ ์ํค๊ธฐ (0) | 2008.03.17 |
๋ํ๋จผํธ์์ ๋ค๋ฅธํ๋ ์๋ด์ ์๋ ํผ๊ฐ์ฒด ์ ์ด (0) | 2008.03.13 |
- Total
- Today
- Yesterday
- ๋ณต๊ทผ์ด๋
- MS-SQL
- I Don't Care
- Servlet
- ํจ์
- JSTL
- Java
- Ajax
- JavaScript
- ๊ธฐํ
- php
- ๊ฒฝ์ ์ฉ์ด
- 2ne1
- ์นด๋ฐ์จ๋ผ์ธ
- ๋ฉ๋ฐฐํ
- ์ธํจ์ด
- ์น์์ด์ ์
- asp
- ์์์ฌ์ด๋
- jQuery
- ์๋ฆฌ
- EL
- JSP
- ๋์ค
- MySQL
- ์๋ฐ์คํฌ๋ฆฝํธ
- JS
- JSON
- ์๋ธ๋ฆฟ
- 8๋ง์ผ
์ผ | ์ | ํ | ์ | ๋ชฉ | ๊ธ | ํ |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |