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

· 17년 전 · 2281

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,489
17년 전 조회 1,237
17년 전 조회 1,310
17년 전 조회 3,117
17년 전 조회 2,665
17년 전 조회 2,224
17년 전 조회 2,243
17년 전 조회 1,985
17년 전 조회 2,430
17년 전 조회 2,204
17년 전 조회 2,163
17년 전 조회 2,058
17년 전 조회 1,375
17년 전 조회 2,009
17년 전 조회 2,418
17년 전 조회 2,501
17년 전 조회 1,822
17년 전 조회 1,689
17년 전 조회 1,548
17년 전 조회 2,775
17년 전 조회 2,851
17년 전 조회 2,261
17년 전 조회 2,603
17년 전 조회 2,913
17년 전 조회 1,506
17년 전 조회 1,362
17년 전 조회 6,527
17년 전 조회 1,361
17년 전 조회 1,815
17년 전 조회 1,970
17년 전 조회 1,278
17년 전 조회 1,360
17년 전 조회 2,067
17년 전 조회 1,704
17년 전 조회 3,822
17년 전 조회 1,391
17년 전 조회 2,107
17년 전 조회 1,354
17년 전 조회 1,586
17년 전 조회 2,571
17년 전 조회 2,211
17년 전 조회 1,212
17년 전 조회 1,222
17년 전 조회 1,292
17년 전 조회 6,237
17년 전 조회 6,048
17년 전 조회 2,227
17년 전 조회 1,202
17년 전 조회 1,312
17년 전 조회 2,282
17년 전 조회 1,685
17년 전 조회 1,339
17년 전 조회 1,362
17년 전 조회 1,308
17년 전 조회 1,242
17년 전 조회 4,155
17년 전 조회 2,371
17년 전 조회 1,812
17년 전 조회 2,960
17년 전 조회 1,654
17년 전 조회 1,333
17년 전 조회 1,367
17년 전 조회 1,414
17년 전 조회 1,313
17년 전 조회 1,416
17년 전 조회 2,594
17년 전 조회 4,397
17년 전 조회 1,365
17년 전 조회 4,133
17년 전 조회 4,284
17년 전 조회 1,397
17년 전 조회 2,364
17년 전 조회 1,816
17년 전 조회 3,406
17년 전 조회 1,550
17년 전 조회 3,790
17년 전 조회 3,582
17년 전 조회 2,766
17년 전 조회 3,125
17년 전 조회 2,826
17년 전 조회 2,144
17년 전 조회 3,499
17년 전 조회 2,828
17년 전 조회 3,715
17년 전 조회 1,327
17년 전 조회 2,442
17년 전 조회 1,510
17년 전 조회 1,371
17년 전 조회 1,249
17년 전 조회 1,234
17년 전 조회 1,612
17년 전 조회 3,052
17년 전 조회 3,440
17년 전 조회 3,193
17년 전 조회 2,077
17년 전 조회 4,194
17년 전 조회 1,598
17년 전 조회 1,311
17년 전 조회 1,427
17년 전 조회 1,296