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

· 17년 전 · 2094

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,326
17년 전 조회 1,056
17년 전 조회 1,137
17년 전 조회 2,937
17년 전 조회 2,477
17년 전 조회 2,054
17년 전 조회 2,058
17년 전 조회 1,811
17년 전 조회 2,257
17년 전 조회 2,028
17년 전 조회 2,000
17년 전 조회 1,887
17년 전 조회 1,224
17년 전 조회 1,840
17년 전 조회 2,243
17년 전 조회 2,320
17년 전 조회 1,658
17년 전 조회 1,521
17년 전 조회 1,373
17년 전 조회 2,592
17년 전 조회 2,685
17년 전 조회 2,079
17년 전 조회 2,431
17년 전 조회 2,734
17년 전 조회 1,338
17년 전 조회 1,200
17년 전 조회 6,341
17년 전 조회 1,187
17년 전 조회 1,642
17년 전 조회 1,787
17년 전 조회 1,115
17년 전 조회 1,203
17년 전 조회 1,904
17년 전 조회 1,533
17년 전 조회 3,635
17년 전 조회 1,220
17년 전 조회 1,925
17년 전 조회 1,180
17년 전 조회 1,396
17년 전 조회 2,373
17년 전 조회 2,026
17년 전 조회 1,051
17년 전 조회 1,054
17년 전 조회 1,105
17년 전 조회 6,055
17년 전 조회 5,863
17년 전 조회 2,044
17년 전 조회 1,035
17년 전 조회 1,132
17년 전 조회 2,095
17년 전 조회 1,526
17년 전 조회 1,172
17년 전 조회 1,200
17년 전 조회 1,139
17년 전 조회 1,059
17년 전 조회 3,970
17년 전 조회 2,180
17년 전 조회 1,632
17년 전 조회 2,777
17년 전 조회 1,484
17년 전 조회 1,167
17년 전 조회 1,190
17년 전 조회 1,256
17년 전 조회 1,145
17년 전 조회 1,259
17년 전 조회 2,413
17년 전 조회 4,204
17년 전 조회 1,203
17년 전 조회 3,960
17년 전 조회 4,113
17년 전 조회 1,225
17년 전 조회 2,190
17년 전 조회 1,633
17년 전 조회 3,229
17년 전 조회 1,369
17년 전 조회 3,610
17년 전 조회 3,403
17년 전 조회 2,575
17년 전 조회 2,945
17년 전 조회 2,638
17년 전 조회 1,953
17년 전 조회 3,327
17년 전 조회 2,636
17년 전 조회 3,534
17년 전 조회 1,164
17년 전 조회 2,263
17년 전 조회 1,337
17년 전 조회 1,205
17년 전 조회 1,078
17년 전 조회 1,061
17년 전 조회 1,435
17년 전 조회 2,872
17년 전 조회 3,268
17년 전 조회 3,011
17년 전 조회 1,893
17년 전 조회 4,008
17년 전 조회 1,421
17년 전 조회 1,136
17년 전 조회 1,247
17년 전 조회 1,130
🐛 버그신고