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

· 17년 전 · 2089

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,316
17년 전 조회 1,046
17년 전 조회 1,128
17년 전 조회 2,931
17년 전 조회 2,469
17년 전 조회 2,048
17년 전 조회 2,049
17년 전 조회 1,802
17년 전 조회 2,250
17년 전 조회 2,021
17년 전 조회 1,995
17년 전 조회 1,880
17년 전 조회 1,214
17년 전 조회 1,835
17년 전 조회 2,238
17년 전 조회 2,308
17년 전 조회 1,648
17년 전 조회 1,515
17년 전 조회 1,364
17년 전 조회 2,585
17년 전 조회 2,679
17년 전 조회 2,072
17년 전 조회 2,425
17년 전 조회 2,729
17년 전 조회 1,330
17년 전 조회 1,193
17년 전 조회 6,334
17년 전 조회 1,180
17년 전 조회 1,633
17년 전 조회 1,784
17년 전 조회 1,102
17년 전 조회 1,197
17년 전 조회 1,896
17년 전 조회 1,527
17년 전 조회 3,626
17년 전 조회 1,210
17년 전 조회 1,916
17년 전 조회 1,173
17년 전 조회 1,392
17년 전 조회 2,366
17년 전 조회 2,023
17년 전 조회 1,041
17년 전 조회 1,046
17년 전 조회 1,094
17년 전 조회 6,049
17년 전 조회 5,858
17년 전 조회 2,035
17년 전 조회 1,027
17년 전 조회 1,125
17년 전 조회 2,090
17년 전 조회 1,519
17년 전 조회 1,165
17년 전 조회 1,193
17년 전 조회 1,131
17년 전 조회 1,048
17년 전 조회 3,963
17년 전 조회 2,173
17년 전 조회 1,620
17년 전 조회 2,771
17년 전 조회 1,478
17년 전 조회 1,160
17년 전 조회 1,179
17년 전 조회 1,249
17년 전 조회 1,137
17년 전 조회 1,251
17년 전 조회 2,403
17년 전 조회 4,195
17년 전 조회 1,194
17년 전 조회 3,954
17년 전 조회 4,107
17년 전 조회 1,217
17년 전 조회 2,185
17년 전 조회 1,624
17년 전 조회 3,221
17년 전 조회 1,361
17년 전 조회 3,605
17년 전 조회 3,397
17년 전 조회 2,570
17년 전 조회 2,939
17년 전 조회 2,632
17년 전 조회 1,947
17년 전 조회 3,318
17년 전 조회 2,628
17년 전 조회 3,529
17년 전 조회 1,157
17년 전 조회 2,256
17년 전 조회 1,329
17년 전 조회 1,197
17년 전 조회 1,070
17년 전 조회 1,053
17년 전 조회 1,426
17년 전 조회 2,866
17년 전 조회 3,260
17년 전 조회 3,003
17년 전 조회 1,886
17년 전 조회 4,003
17년 전 조회 1,414
17년 전 조회 1,129
17년 전 조회 1,242
17년 전 조회 1,123
🐛 버그신고