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

· 17년 전 · 2085

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,315
17년 전 조회 1,042
17년 전 조회 1,127
17년 전 조회 2,929
17년 전 조회 2,467
17년 전 조회 2,047
17년 전 조회 2,048
17년 전 조회 1,801
17년 전 조회 2,248
17년 전 조회 2,018
17년 전 조회 1,992
17년 전 조회 1,879
17년 전 조회 1,213
17년 전 조회 1,833
17년 전 조회 2,236
17년 전 조회 2,305
17년 전 조회 1,646
17년 전 조회 1,511
17년 전 조회 1,362
17년 전 조회 2,581
17년 전 조회 2,675
17년 전 조회 2,071
17년 전 조회 2,421
17년 전 조회 2,724
17년 전 조회 1,326
17년 전 조회 1,192
17년 전 조회 6,332
17년 전 조회 1,180
17년 전 조회 1,631
17년 전 조회 1,781
17년 전 조회 1,102
17년 전 조회 1,194
17년 전 조회 1,895
17년 전 조회 1,525
17년 전 조회 3,624
17년 전 조회 1,209
17년 전 조회 1,916
17년 전 조회 1,171
17년 전 조회 1,389
17년 전 조회 2,364
17년 전 조회 2,019
17년 전 조회 1,039
17년 전 조회 1,042
17년 전 조회 1,093
17년 전 조회 6,048
17년 전 조회 5,856
17년 전 조회 2,035
17년 전 조회 1,024
17년 전 조회 1,124
17년 전 조회 2,086
17년 전 조회 1,517
17년 전 조회 1,161
17년 전 조회 1,191
17년 전 조회 1,131
17년 전 조회 1,046
17년 전 조회 3,963
17년 전 조회 2,172
17년 전 조회 1,620
17년 전 조회 2,769
17년 전 조회 1,476
17년 전 조회 1,157
17년 전 조회 1,177
17년 전 조회 1,247
17년 전 조회 1,134
17년 전 조회 1,248
17년 전 조회 2,401
17년 전 조회 4,191
17년 전 조회 1,190
17년 전 조회 3,951
17년 전 조회 4,104
17년 전 조회 1,215
17년 전 조회 2,183
17년 전 조회 1,623
17년 전 조회 3,217
17년 전 조회 1,358
17년 전 조회 3,603
17년 전 조회 3,395
17년 전 조회 2,568
17년 전 조회 2,938
17년 전 조회 2,630
17년 전 조회 1,947
17년 전 조회 3,317
17년 전 조회 2,628
17년 전 조회 3,526
17년 전 조회 1,154
17년 전 조회 2,254
17년 전 조회 1,326
17년 전 조회 1,195
17년 전 조회 1,067
17년 전 조회 1,052
17년 전 조회 1,425
17년 전 조회 2,863
17년 전 조회 3,259
17년 전 조회 3,000
17년 전 조회 1,883
17년 전 조회 4,001
17년 전 조회 1,412
17년 전 조회 1,127
17년 전 조회 1,241
17년 전 조회 1,119
🐛 버그신고