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

· 17년 전 · 2083

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,309
17년 전 조회 1,041
17년 전 조회 1,124
17년 전 조회 2,926
17년 전 조회 2,461
17년 전 조회 2,045
17년 전 조회 2,044
17년 전 조회 1,799
17년 전 조회 2,242
17년 전 조회 2,015
17년 전 조회 1,989
17년 전 조회 1,877
17년 전 조회 1,212
17년 전 조회 1,828
17년 전 조회 2,232
17년 전 조회 2,304
17년 전 조회 1,642
17년 전 조회 1,510
17년 전 조회 1,361
17년 전 조회 2,577
17년 전 조회 2,675
17년 전 조회 2,068
17년 전 조회 2,417
17년 전 조회 2,722
17년 전 조회 1,325
17년 전 조회 1,192
17년 전 조회 6,324
17년 전 조회 1,177
17년 전 조회 1,626
17년 전 조회 1,777
17년 전 조회 1,101
17년 전 조회 1,191
17년 전 조회 1,893
17년 전 조회 1,521
17년 전 조회 3,620
17년 전 조회 1,206
17년 전 조회 1,912
17년 전 조회 1,168
17년 전 조회 1,384
17년 전 조회 2,361
17년 전 조회 2,015
17년 전 조회 1,038
17년 전 조회 1,038
17년 전 조회 1,092
17년 전 조회 6,047
17년 전 조회 5,851
17년 전 조회 2,028
17년 전 조회 1,024
17년 전 조회 1,121
17년 전 조회 2,084
17년 전 조회 1,513
17년 전 조회 1,158
17년 전 조회 1,188
17년 전 조회 1,129
17년 전 조회 1,043
17년 전 조회 3,961
17년 전 조회 2,170
17년 전 조회 1,620
17년 전 조회 2,767
17년 전 조회 1,470
17년 전 조회 1,152
17년 전 조회 1,174
17년 전 조회 1,244
17년 전 조회 1,131
17년 전 조회 1,245
17년 전 조회 2,400
17년 전 조회 4,187
17년 전 조회 1,188
17년 전 조회 3,949
17년 전 조회 4,098
17년 전 조회 1,213
17년 전 조회 2,179
17년 전 조회 1,622
17년 전 조회 3,215
17년 전 조회 1,357
17년 전 조회 3,599
17년 전 조회 3,391
17년 전 조회 2,564
17년 전 조회 2,938
17년 전 조회 2,627
17년 전 조회 1,943
17년 전 조회 3,313
17년 전 조회 2,623
17년 전 조회 3,523
17년 전 조회 1,151
17년 전 조회 2,252
17년 전 조회 1,324
17년 전 조회 1,191
17년 전 조회 1,066
17년 전 조회 1,050
17년 전 조회 1,421
17년 전 조회 2,861
17년 전 조회 3,256
17년 전 조회 3,000
17년 전 조회 1,883
17년 전 조회 3,996
17년 전 조회 1,408
17년 전 조회 1,124
17년 전 조회 1,237
17년 전 조회 1,118
🐛 버그신고