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

· 17년 전 · 2091

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,321
17년 전 조회 1,051
17년 전 조회 1,133
17년 전 조회 2,933
17년 전 조회 2,473
17년 전 조회 2,053
17년 전 조회 2,054
17년 전 조회 1,810
17년 전 조회 2,253
17년 전 조회 2,024
17년 전 조회 1,996
17년 전 조회 1,884
17년 전 조회 1,219
17년 전 조회 1,837
17년 전 조회 2,241
17년 전 조회 2,314
17년 전 조회 1,652
17년 전 조회 1,516
17년 전 조회 1,370
17년 전 조회 2,588
17년 전 조회 2,682
17년 전 조회 2,076
17년 전 조회 2,428
17년 전 조회 2,732
17년 전 조회 1,334
17년 전 조회 1,197
17년 전 조회 6,338
17년 전 조회 1,184
17년 전 조회 1,635
17년 전 조회 1,785
17년 전 조회 1,110
17년 전 조회 1,199
17년 전 조회 1,900
17년 전 조회 1,529
17년 전 조회 3,632
17년 전 조회 1,215
17년 전 조회 1,922
17년 전 조회 1,178
17년 전 조회 1,393
17년 전 조회 2,370
17년 전 조회 2,023
17년 전 조회 1,046
17년 전 조회 1,048
17년 전 조회 1,099
17년 전 조회 6,051
17년 전 조회 5,860
17년 전 조회 2,041
17년 전 조회 1,029
17년 전 조회 1,129
17년 전 조회 2,092
17년 전 조회 1,522
17년 전 조회 1,166
17년 전 조회 1,194
17년 전 조회 1,135
17년 전 조회 1,053
17년 전 조회 3,969
17년 전 조회 2,176
17년 전 조회 1,628
17년 전 조회 2,771
17년 전 조회 1,481
17년 전 조회 1,162
17년 전 조회 1,183
17년 전 조회 1,254
17년 전 조회 1,142
17년 전 조회 1,253
17년 전 조회 2,407
17년 전 조회 4,199
17년 전 조회 1,197
17년 전 조회 3,956
17년 전 조회 4,109
17년 전 조회 1,221
17년 전 조회 2,190
17년 전 조회 1,631
17년 전 조회 3,224
17년 전 조회 1,364
17년 전 조회 3,608
17년 전 조회 3,400
17년 전 조회 2,573
17년 전 조회 2,942
17년 전 조회 2,637
17년 전 조회 1,951
17년 전 조회 3,323
17년 전 조회 2,631
17년 전 조회 3,531
17년 전 조회 1,160
17년 전 조회 2,260
17년 전 조회 1,333
17년 전 조회 1,201
17년 전 조회 1,073
17년 전 조회 1,058
17년 전 조회 1,432
17년 전 조회 2,868
17년 전 조회 3,266
17년 전 조회 3,008
17년 전 조회 1,888
17년 전 조회 4,004
17년 전 조회 1,416
17년 전 조회 1,133
17년 전 조회 1,245
17년 전 조회 1,126
🐛 버그신고