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

· 17년 전 · 2080

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,306
17년 전 조회 1,039
17년 전 조회 1,121
17년 전 조회 2,924
17년 전 조회 2,460
17년 전 조회 2,042
17년 전 조회 2,042
17년 전 조회 1,795
17년 전 조회 2,241
17년 전 조회 2,014
17년 전 조회 1,987
17년 전 조회 1,875
17년 전 조회 1,209
17년 전 조회 1,827
17년 전 조회 2,228
17년 전 조회 2,301
17년 전 조회 1,640
17년 전 조회 1,509
17년 전 조회 1,359
17년 전 조회 2,577
17년 전 조회 2,673
17년 전 조회 2,068
17년 전 조회 2,415
17년 전 조회 2,722
17년 전 조회 1,324
17년 전 조회 1,190
17년 전 조회 6,323
17년 전 조회 1,174
17년 전 조회 1,625
17년 전 조회 1,774
17년 전 조회 1,099
17년 전 조회 1,190
17년 전 조회 1,892
17년 전 조회 1,521
17년 전 조회 3,618
17년 전 조회 1,206
17년 전 조회 1,909
17년 전 조회 1,167
17년 전 조회 1,382
17년 전 조회 2,360
17년 전 조회 2,013
17년 전 조회 1,037
17년 전 조회 1,038
17년 전 조회 1,091
17년 전 조회 6,045
17년 전 조회 5,851
17년 전 조회 2,027
17년 전 조회 1,022
17년 전 조회 1,120
17년 전 조회 2,081
17년 전 조회 1,512
17년 전 조회 1,158
17년 전 조회 1,184
17년 전 조회 1,127
17년 전 조회 1,043
17년 전 조회 3,959
17년 전 조회 2,167
17년 전 조회 1,619
17년 전 조회 2,765
17년 전 조회 1,468
17년 전 조회 1,152
17년 전 조회 1,173
17년 전 조회 1,242
17년 전 조회 1,130
17년 전 조회 1,244
17년 전 조회 2,397
17년 전 조회 4,186
17년 전 조회 1,186
17년 전 조회 3,947
17년 전 조회 4,096
17년 전 조회 1,212
17년 전 조회 2,177
17년 전 조회 1,621
17년 전 조회 3,214
17년 전 조회 1,355
17년 전 조회 3,597
17년 전 조회 3,390
17년 전 조회 2,562
17년 전 조회 2,937
17년 전 조회 2,625
17년 전 조회 1,941
17년 전 조회 3,312
17년 전 조회 2,622
17년 전 조회 3,521
17년 전 조회 1,149
17년 전 조회 2,250
17년 전 조회 1,323
17년 전 조회 1,188
17년 전 조회 1,064
17년 전 조회 1,049
17년 전 조회 1,420
17년 전 조회 2,859
17년 전 조회 3,255
17년 전 조회 2,999
17년 전 조회 1,881
17년 전 조회 3,996
17년 전 조회 1,408
17년 전 조회 1,120
17년 전 조회 1,235
17년 전 조회 1,114
🐛 버그신고