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

· 17년 전 · 2084

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,314
17년 전 조회 1,041
17년 전 조회 1,126
17년 전 조회 2,928
17년 전 조회 2,466
17년 전 조회 2,047
17년 전 조회 2,046
17년 전 조회 1,801
17년 전 조회 2,246
17년 전 조회 2,017
17년 전 조회 1,991
17년 전 조회 1,879
17년 전 조회 1,213
17년 전 조회 1,831
17년 전 조회 2,233
17년 전 조회 2,305
17년 전 조회 1,644
17년 전 조회 1,511
17년 전 조회 1,362
17년 전 조회 2,580
17년 전 조회 2,675
17년 전 조회 2,070
17년 전 조회 2,419
17년 전 조회 2,724
17년 전 조회 1,325
17년 전 조회 1,192
17년 전 조회 6,329
17년 전 조회 1,180
17년 전 조회 1,630
17년 전 조회 1,781
17년 전 조회 1,102
17년 전 조회 1,192
17년 전 조회 1,895
17년 전 조회 1,523
17년 전 조회 3,622
17년 전 조회 1,209
17년 전 조회 1,915
17년 전 조회 1,170
17년 전 조회 1,388
17년 전 조회 2,363
17년 전 조회 2,018
17년 전 조회 1,039
17년 전 조회 1,041
17년 전 조회 1,092
17년 전 조회 6,048
17년 전 조회 5,856
17년 전 조회 2,033
17년 전 조회 1,024
17년 전 조회 1,123
17년 전 조회 2,085
17년 전 조회 1,516
17년 전 조회 1,161
17년 전 조회 1,189
17년 전 조회 1,130
17년 전 조회 1,045
17년 전 조회 3,963
17년 전 조회 2,172
17년 전 조회 1,620
17년 전 조회 2,769
17년 전 조회 1,472
17년 전 조회 1,156
17년 전 조회 1,176
17년 전 조회 1,247
17년 전 조회 1,134
17년 전 조회 1,247
17년 전 조회 2,401
17년 전 조회 4,189
17년 전 조회 1,190
17년 전 조회 3,950
17년 전 조회 4,101
17년 전 조회 1,213
17년 전 조회 2,181
17년 전 조회 1,622
17년 전 조회 3,217
17년 전 조회 1,357
17년 전 조회 3,601
17년 전 조회 3,394
17년 전 조회 2,566
17년 전 조회 2,938
17년 전 조회 2,628
17년 전 조회 1,947
17년 전 조회 3,315
17년 전 조회 2,627
17년 전 조회 3,526
17년 전 조회 1,153
17년 전 조회 2,254
17년 전 조회 1,324
17년 전 조회 1,193
17년 전 조회 1,067
17년 전 조회 1,051
17년 전 조회 1,424
17년 전 조회 2,861
17년 전 조회 3,259
17년 전 조회 3,000
17년 전 조회 1,883
17년 전 조회 3,998
17년 전 조회 1,411
17년 전 조회 1,124
17년 전 조회 1,239
17년 전 조회 1,119
🐛 버그신고