특정 이메일 입력 금지및 이메일 유효성 검사

· 17년 전 · 2464

daum, naver, yahoo,hanmail 계정은 입력할 수 없습니다<br>

<form name="validation" onSubmit="return checkbae()">
이메일 주소 입력 :
<input type="text" size=18 name="emailcheck"><br>
<input type="submit">
</form>

<script language="JavaScript1.2">

var invalidaddress=new Array()
invalidaddress[0]="daum"
invalidaddress[1]="naver"
invalidaddress[2]="yahoo"
invalidaddress[3]="hanmail"

var testresults
function checkemail(){
var invalidcheck=0;
var str=document.validation.emailcheck.value
var filter=/^(\w+(?:\.\w+)*)@((?:\w+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
if (filter.test(str)){
var tempstring=str.split("@")
tempstring=tempstring[1].split(".")
for (i=0;i<invalidaddress.length;i++){
if (tempstring[0]==invalidaddress[i])
invalidcheck=1
}
if (invalidcheck!=1)
testresults=true
else{
alert("입력 금지된 계정입니다")
testresults=false
}
}
else{
alert("이메일 주소가 유효하지 않습니다")
testresults=false
}
return (testresults)
}
function checkbae(){
if (document.layers||document.getElementById||document.all)
return checkemail()
else
return true
}
</script>

[이 게시물은 관리자님에 의해 2011-10-31 16:57:14 JavaScript에서 이동 됨]
|
댓글을 작성하시려면 로그인이 필요합니다.

프로그램

+
제목 글쓴이 날짜 조회
17년 전 조회 1,694
17년 전 조회 1,428
17년 전 조회 1,516
17년 전 조회 3,282
17년 전 조회 2,859
17년 전 조회 2,415
17년 전 조회 2,433
17년 전 조회 2,187
17년 전 조회 2,621
17년 전 조회 2,407
17년 전 조회 2,349
17년 전 조회 2,259
17년 전 조회 1,568
17년 전 조회 2,192
17년 전 조회 2,622
17년 전 조회 2,698
17년 전 조회 2,025
17년 전 조회 1,864
17년 전 조회 1,741
17년 전 조회 2,958
17년 전 조회 3,043
17년 전 조회 2,444
17년 전 조회 2,803
17년 전 조회 3,093
17년 전 조회 1,691
17년 전 조회 1,531
17년 전 조회 6,721
17년 전 조회 1,548
17년 전 조회 2,003
17년 전 조회 2,147
17년 전 조회 1,477
17년 전 조회 1,557
17년 전 조회 2,248
17년 전 조회 1,897
17년 전 조회 4,016
17년 전 조회 1,578
17년 전 조회 2,279
17년 전 조회 1,546
17년 전 조회 1,762
17년 전 조회 2,748
17년 전 조회 2,415
17년 전 조회 1,397
17년 전 조회 1,414
17년 전 조회 1,473
17년 전 조회 6,428
17년 전 조회 6,236
17년 전 조회 2,416
17년 전 조회 1,403
17년 전 조회 1,528
17년 전 조회 2,465
17년 전 조회 1,869
17년 전 조회 1,535
17년 전 조회 1,554
17년 전 조회 1,481
17년 전 조회 1,446
17년 전 조회 4,359
17년 전 조회 2,576
17년 전 조회 1,995
17년 전 조회 3,137
17년 전 조회 1,833
17년 전 조회 1,521
17년 전 조회 1,561
17년 전 조회 1,618
17년 전 조회 1,508
17년 전 조회 1,609
17년 전 조회 2,793
17년 전 조회 4,612
17년 전 조회 1,549
17년 전 조회 4,310
17년 전 조회 4,479
17년 전 조회 1,593
17년 전 조회 2,575
17년 전 조회 2,003
17년 전 조회 3,609
17년 전 조회 1,746
17년 전 조회 4,014
17년 전 조회 3,789
17년 전 조회 2,969
17년 전 조회 3,336
17년 전 조회 3,044
17년 전 조회 2,354
17년 전 조회 3,706
17년 전 조회 3,036
17년 전 조회 3,913
17년 전 조회 1,534
17년 전 조회 2,647
17년 전 조회 1,720
17년 전 조회 1,577
17년 전 조회 1,457
17년 전 조회 1,439
17년 전 조회 1,802
17년 전 조회 3,250
17년 전 조회 3,631
17년 전 조회 3,397
17년 전 조회 2,275
17년 전 조회 4,392
17년 전 조회 1,784
17년 전 조회 1,520
17년 전 조회 1,638
17년 전 조회 1,489