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

· 17년 전 · 2078

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,305
17년 전 조회 1,036
17년 전 조회 1,119
17년 전 조회 2,922
17년 전 조회 2,459
17년 전 조회 2,041
17년 전 조회 2,040
17년 전 조회 1,794
17년 전 조회 2,240
17년 전 조회 2,011
17년 전 조회 1,985
17년 전 조회 1,873
17년 전 조회 1,207
17년 전 조회 1,824
17년 전 조회 2,228
17년 전 조회 2,300
17년 전 조회 1,638
17년 전 조회 1,507
17년 전 조회 1,356
17년 전 조회 2,574
17년 전 조회 2,671
17년 전 조회 2,067
17년 전 조회 2,413
17년 전 조회 2,720
17년 전 조회 1,322
17년 전 조회 1,186
17년 전 조회 6,321
17년 전 조회 1,173
17년 전 조회 1,624
17년 전 조회 1,772
17년 전 조회 1,097
17년 전 조회 1,190
17년 전 조회 1,890
17년 전 조회 1,520
17년 전 조회 3,618
17년 전 조회 1,203
17년 전 조회 1,908
17년 전 조회 1,166
17년 전 조회 1,381
17년 전 조회 2,359
17년 전 조회 2,012
17년 전 조회 1,035
17년 전 조회 1,038
17년 전 조회 1,090
17년 전 조회 6,044
17년 전 조회 5,849
17년 전 조회 2,025
17년 전 조회 1,019
17년 전 조회 1,116
17년 전 조회 2,079
17년 전 조회 1,511
17년 전 조회 1,157
17년 전 조회 1,184
17년 전 조회 1,127
17년 전 조회 1,042
17년 전 조회 3,955
17년 전 조회 2,163
17년 전 조회 1,618
17년 전 조회 2,761
17년 전 조회 1,467
17년 전 조회 1,150
17년 전 조회 1,173
17년 전 조회 1,241
17년 전 조회 1,127
17년 전 조회 1,243
17년 전 조회 2,397
17년 전 조회 4,183
17년 전 조회 1,186
17년 전 조회 3,944
17년 전 조회 4,095
17년 전 조회 1,210
17년 전 조회 2,175
17년 전 조회 1,618
17년 전 조회 3,211
17년 전 조회 1,354
17년 전 조회 3,596
17년 전 조회 3,388
17년 전 조회 2,559
17년 전 조회 2,933
17년 전 조회 2,624
17년 전 조회 1,941
17년 전 조회 3,309
17년 전 조회 2,620
17년 전 조회 3,518
17년 전 조회 1,146
17년 전 조회 2,248
17년 전 조회 1,321
17년 전 조회 1,187
17년 전 조회 1,061
17년 전 조회 1,045
17년 전 조회 1,419
17년 전 조회 2,857
17년 전 조회 3,251
17년 전 조회 2,998
17년 전 조회 1,878
17년 전 조회 3,993
17년 전 조회 1,406
17년 전 조회 1,120
17년 전 조회 1,234
17년 전 조회 1,113
🐛 버그신고