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

· 17년 전 · 2088

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,045
17년 전 조회 1,128
17년 전 조회 2,931
17년 전 조회 2,469
17년 전 조회 2,047
17년 전 조회 2,049
17년 전 조회 1,802
17년 전 조회 2,249
17년 전 조회 2,021
17년 전 조회 1,994
17년 전 조회 1,880
17년 전 조회 1,214
17년 전 조회 1,835
17년 전 조회 2,238
17년 전 조회 2,306
17년 전 조회 1,648
17년 전 조회 1,514
17년 전 조회 1,364
17년 전 조회 2,584
17년 전 조회 2,678
17년 전 조회 2,072
17년 전 조회 2,425
17년 전 조회 2,729
17년 전 조회 1,330
17년 전 조회 1,193
17년 전 조회 6,333
17년 전 조회 1,180
17년 전 조회 1,633
17년 전 조회 1,784
17년 전 조회 1,102
17년 전 조회 1,196
17년 전 조회 1,895
17년 전 조회 1,527
17년 전 조회 3,625
17년 전 조회 1,210
17년 전 조회 1,916
17년 전 조회 1,173
17년 전 조회 1,392
17년 전 조회 2,365
17년 전 조회 2,021
17년 전 조회 1,041
17년 전 조회 1,045
17년 전 조회 1,094
17년 전 조회 6,049
17년 전 조회 5,856
17년 전 조회 2,035
17년 전 조회 1,026
17년 전 조회 1,125
17년 전 조회 2,089
17년 전 조회 1,519
17년 전 조회 1,165
17년 전 조회 1,193
17년 전 조회 1,131
17년 전 조회 1,047
17년 전 조회 3,963
17년 전 조회 2,173
17년 전 조회 1,620
17년 전 조회 2,770
17년 전 조회 1,478
17년 전 조회 1,160
17년 전 조회 1,179
17년 전 조회 1,248
17년 전 조회 1,137
17년 전 조회 1,250
17년 전 조회 2,401
17년 전 조회 4,193
17년 전 조회 1,193
17년 전 조회 3,952
17년 전 조회 4,107
17년 전 조회 1,217
17년 전 조회 2,184
17년 전 조회 1,624
17년 전 조회 3,220
17년 전 조회 1,360
17년 전 조회 3,604
17년 전 조회 3,395
17년 전 조회 2,570
17년 전 조회 2,938
17년 전 조회 2,632
17년 전 조회 1,947
17년 전 조회 3,317
17년 전 조회 2,628
17년 전 조회 3,528
17년 전 조회 1,154
17년 전 조회 2,256
17년 전 조회 1,328
17년 전 조회 1,196
17년 전 조회 1,069
17년 전 조회 1,052
17년 전 조회 1,426
17년 전 조회 2,865
17년 전 조회 3,260
17년 전 조회 3,003
17년 전 조회 1,886
17년 전 조회 4,003
17년 전 조회 1,414
17년 전 조회 1,129
17년 전 조회 1,242
17년 전 조회 1,122
🐛 버그신고