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

· 17년 전 · 2354

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,561
17년 전 조회 1,303
17년 전 조회 1,378
17년 전 조회 3,169
17년 전 조회 2,723
17년 전 조회 2,292
17년 전 조회 2,326
17년 전 조회 2,061
17년 전 조회 2,493
17년 전 조회 2,287
17년 전 조회 2,233
17년 전 조회 2,131
17년 전 조회 1,434
17년 전 조회 2,084
17년 전 조회 2,490
17년 전 조회 2,575
17년 전 조회 1,884
17년 전 조회 1,743
17년 전 조회 1,615
17년 전 조회 2,832
17년 전 조회 2,917
17년 전 조회 2,329
17년 전 조회 2,678
17년 전 조회 2,975
17년 전 조회 1,576
17년 전 조회 1,413
17년 전 조회 6,599
17년 전 조회 1,433
17년 전 조회 1,880
17년 전 조회 2,039
17년 전 조회 1,350
17년 전 조회 1,430
17년 전 조회 2,119
17년 전 조회 1,770
17년 전 조회 3,888
17년 전 조회 1,460
17년 전 조회 2,163
17년 전 조회 1,408
17년 전 조회 1,656
17년 전 조회 2,628
17년 전 조회 2,275
17년 전 조회 1,271
17년 전 조회 1,291
17년 전 조회 1,341
17년 전 조회 6,302
17년 전 조회 6,117
17년 전 조회 2,295
17년 전 조회 1,274
17년 전 조회 1,389
17년 전 조회 2,355
17년 전 조회 1,746
17년 전 조회 1,410
17년 전 조회 1,431
17년 전 조회 1,363
17년 전 조회 1,317
17년 전 조회 4,219
17년 전 조회 2,440
17년 전 조회 1,880
17년 전 조회 3,024
17년 전 조회 1,715
17년 전 조회 1,394
17년 전 조회 1,436
17년 전 조회 1,482
17년 전 조회 1,387
17년 전 조회 1,485
17년 전 조회 2,662
17년 전 조회 4,472
17년 전 조회 1,427
17년 전 조회 4,192
17년 전 조회 4,346
17년 전 조회 1,465
17년 전 조회 2,428
17년 전 조회 1,878
17년 전 조회 3,472
17년 전 조회 1,612
17년 전 조회 3,863
17년 전 조회 3,666
17년 전 조회 2,834
17년 전 조회 3,182
17년 전 조회 2,894
17년 전 조회 2,206
17년 전 조회 3,566
17년 전 조회 2,897
17년 전 조회 3,785
17년 전 조회 1,395
17년 전 조회 2,506
17년 전 조회 1,578
17년 전 조회 1,431
17년 전 조회 1,317
17년 전 조회 1,305
17년 전 조회 1,674
17년 전 조회 3,115
17년 전 조회 3,506
17년 전 조회 3,259
17년 전 조회 2,150
17년 전 조회 4,264
17년 전 조회 1,646
17년 전 조회 1,372
17년 전 조회 1,489
17년 전 조회 1,362