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

· 17년 전 · 2090

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,320
17년 전 조회 1,050
17년 전 조회 1,132
17년 전 조회 2,932
17년 전 조회 2,473
17년 전 조회 2,053
17년 전 조회 2,054
17년 전 조회 1,810
17년 전 조회 2,253
17년 전 조회 2,023
17년 전 조회 1,996
17년 전 조회 1,883
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,075
17년 전 조회 2,426
17년 전 조회 2,732
17년 전 조회 1,333
17년 전 조회 1,197
17년 전 조회 6,338
17년 전 조회 1,184
17년 전 조회 1,633
17년 전 조회 1,785
17년 전 조회 1,110
17년 전 조회 1,199
17년 전 조회 1,900
17년 전 조회 1,529
17년 전 조회 3,631
17년 전 조회 1,215
17년 전 조회 1,921
17년 전 조회 1,176
17년 전 조회 1,393
17년 전 조회 2,369
17년 전 조회 2,023
17년 전 조회 1,046
17년 전 조회 1,047
17년 전 조회 1,097
17년 전 조회 6,051
17년 전 조회 5,858
17년 전 조회 2,039
17년 전 조회 1,029
17년 전 조회 1,128
17년 전 조회 2,091
17년 전 조회 1,521
17년 전 조회 1,166
17년 전 조회 1,194
17년 전 조회 1,135
17년 전 조회 1,053
17년 전 조회 3,968
17년 전 조회 2,176
17년 전 조회 1,628
17년 전 조회 2,771
17년 전 조회 1,481
17년 전 조회 1,162
17년 전 조회 1,182
17년 전 조회 1,254
17년 전 조회 1,142
17년 전 조회 1,253
17년 전 조회 2,406
17년 전 조회 4,198
17년 전 조회 1,197
17년 전 조회 3,956
17년 전 조회 4,108
17년 전 조회 1,219
17년 전 조회 2,189
17년 전 조회 1,628
17년 전 조회 3,223
17년 전 조회 1,363
17년 전 조회 3,607
17년 전 조회 3,400
17년 전 조회 2,572
17년 전 조회 2,942
17년 전 조회 2,637
17년 전 조회 1,951
17년 전 조회 3,322
17년 전 조회 2,631
17년 전 조회 3,530
17년 전 조회 1,159
17년 전 조회 2,260
17년 전 조회 1,333
17년 전 조회 1,200
17년 전 조회 1,073
17년 전 조회 1,058
17년 전 조회 1,432
17년 전 조회 2,868
17년 전 조회 3,266
17년 전 조회 3,008
17년 전 조회 1,887
17년 전 조회 4,004
17년 전 조회 1,416
17년 전 조회 1,132
17년 전 조회 1,244
17년 전 조회 1,125
🐛 버그신고