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

· 17년 전 · 2117

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,346
17년 전 조회 1,082
17년 전 조회 1,164
17년 전 조회 2,964
17년 전 조회 2,506
17년 전 조회 2,084
17년 전 조회 2,089
17년 전 조회 1,834
17년 전 조회 2,287
17년 전 조회 2,059
17년 전 조회 2,024
17년 전 조회 1,914
17년 전 조회 1,244
17년 전 조회 1,861
17년 전 조회 2,262
17년 전 조회 2,352
17년 전 조회 1,685
17년 전 조회 1,542
17년 전 조회 1,399
17년 전 조회 2,614
17년 전 조회 2,710
17년 전 조회 2,108
17년 전 조회 2,457
17년 전 조회 2,763
17년 전 조회 1,355
17년 전 조회 1,220
17년 전 조회 6,367
17년 전 조회 1,214
17년 전 조회 1,670
17년 전 조회 1,810
17년 전 조회 1,138
17년 전 조회 1,228
17년 전 조회 1,932
17년 전 조회 1,557
17년 전 조회 3,656
17년 전 조회 1,245
17년 전 조회 1,947
17년 전 조회 1,205
17년 전 조회 1,425
17년 전 조회 2,397
17년 전 조회 2,057
17년 전 조회 1,072
17년 전 조회 1,079
17년 전 조회 1,134
17년 전 조회 6,083
17년 전 조회 5,887
17년 전 조회 2,078
17년 전 조회 1,054
17년 전 조회 1,162
17년 전 조회 2,118
17년 전 조회 1,550
17년 전 조회 1,195
17년 전 조회 1,221
17년 전 조회 1,160
17년 전 조회 1,088
17년 전 조회 3,994
17년 전 조회 2,204
17년 전 조회 1,653
17년 전 조회 2,803
17년 전 조회 1,503
17년 전 조회 1,191
17년 전 조회 1,218
17년 전 조회 1,277
17년 전 조회 1,164
17년 전 조회 1,273
17년 전 조회 2,437
17년 전 조회 4,229
17년 전 조회 1,233
17년 전 조회 3,977
17년 전 조회 4,132
17년 전 조회 1,246
17년 전 조회 2,212
17년 전 조회 1,655
17년 전 조회 3,253
17년 전 조회 1,395
17년 전 조회 3,638
17년 전 조회 3,434
17년 전 조회 2,599
17년 전 조회 2,973
17년 전 조회 2,665
17년 전 조회 1,981
17년 전 조회 3,346
17년 전 조회 2,665
17년 전 조회 3,555
17년 전 조회 1,176
17년 전 조회 2,288
17년 전 조회 1,358
17년 전 조회 1,233
17년 전 조회 1,101
17년 전 조회 1,084
17년 전 조회 1,455
17년 전 조회 2,896
17년 전 조회 3,292
17년 전 조회 3,035
17년 전 조회 1,916
17년 전 조회 4,020
17년 전 조회 1,441
17년 전 조회 1,160
17년 전 조회 1,273
17년 전 조회 1,149