COMING SOON 🚀

휴대폰번호 검사 하기 입니다.

· 10년 전 · 1373

<SCRIPT LANGUAGE="JavaScript">
<!--
function maskHp(obj) {
    var str = obj.value;
    if ( str ) {
        //var pattern = /[^(ㄱ-힣)]|[-/\s]/g;
        var RegNotNum  = /[\D]/g;
        var pattern = "";
        var format   = "";

        // delete not number ㅋ
        str = str.replace(RegNotNum,'');

        //if( str.length < 4 ) return str;
        if( str.length < 4 ) {
            if( str.length == 3 ) {
                format = "$1";
                pattern = /(^01[\d]{0,1})/;
            } else {
                format = "$1";
                pattern = /(^0[1]?[\d]{0,1})/;
            }
        } else if( str.length > 3 && str.length < 7 ) {
            format = "$1-$2";
            pattern = /(^01[\d]{1})([\d]+)/;
        } else if(str.length == 7 ) {
            format = "$1-$2";
            pattern = /(^01[\d]{1})([\d]{4})/;
        } else {
            format = "$1-$2-$3";
            pattern = /(^01[\d]{1})([\d]{4})([\d]+)/;
        }

        //while( pattern.test(str) ) {
        if ( pattern.test(str) ) {
            obj.value = str.replace(pattern, format);
        } else {
            obj.value = "";
        }
    }
}


function isHpFormat() {
  var str = window.event.srcElement.value;
  //alert ( str );
  if ( window.event.propertyName == "value" && str ) {
        var pattern = "";
        str = str.replace(/[\D]/g,'');
        if( str.length < 4 ) {
            if( str.length == 3 ) pattern = /(^01[\d]{1})/;
            else                  pattern = /(^0[1]?[\d]{0,1})/;
        } else if( str.length > 3 && str.length < 7 ) {
            pattern = /(^01[\d]{1})([\d]+)$/;
        } else if(str.length == 7 ) {
            pattern = /(^01[\d]{1})([\d]{4})/;
        } else {
            pattern = /(^01[\d]{1})([\d]{4})([\d]+)/;
        }
        if ( pattern.test(str) ) {
            return true;
        } else {
            return false;
        }
  } else {
        return true;
      // undefined
  }
}

//-->
</SCRIPT>
<input type='text' id='phon_num' value=''
size='14' maxlength='13'
onpropertychange='if(!isHpFormat()){alert("핸드폰 번호가 정확히 입력해주세요.");this.value="";}'
onkeyup ='maskHp(this);'
onkeydown='maskHp(this);'  >
 

|
댓글을 작성하시려면 로그인이 필요합니다.

프로그램

+
제목 글쓴이 날짜 조회
9년 전 조회 1,460
9년 전 조회 1,552
9년 전 조회 1,487
9년 전 조회 1,539
9년 전 조회 1,641
9년 전 조회 1,456
9년 전 조회 1,482
10년 전 조회 1,487
10년 전 조회 1,600
10년 전 조회 1,467
10년 전 조회 1,575
10년 전 조회 1,407
10년 전 조회 1,482
10년 전 조회 1,303
10년 전 조회 1,534
10년 전 조회 1,335
10년 전 조회 1,360
10년 전 조회 1,469
10년 전 조회 1,372
10년 전 조회 1,402
10년 전 조회 1,328
10년 전 조회 1,744
10년 전 조회 1,779
10년 전 조회 1,742
10년 전 조회 1,689
10년 전 조회 1,479
10년 전 조회 1,620
10년 전 조회 1,761
10년 전 조회 1,458
10년 전 조회 1,773
10년 전 조회 1,734
10년 전 조회 2,110
10년 전 조회 1,718
10년 전 조회 1,925
10년 전 조회 1,557
10년 전 조회 1,685
10년 전 조회 1,409
10년 전 조회 1,466
10년 전 조회 1,530
10년 전 조회 1,522
10년 전 조회 1,668
10년 전 조회 1,442
10년 전 조회 1,467
10년 전 조회 1,429
10년 전 조회 1,382
10년 전 조회 1,449
10년 전 조회 1,256
10년 전 조회 1,329
10년 전 조회 1,226
10년 전 조회 1,374
10년 전 조회 1,328
10년 전 조회 1,796
10년 전 조회 1,271
10년 전 조회 1,239
10년 전 조회 1,495
10년 전 조회 1,301
10년 전 조회 1,271
10년 전 조회 1,282
10년 전 조회 1,225
10년 전 조회 1,145
10년 전 조회 1,136
10년 전 조회 1,233
10년 전 조회 1,234
10년 전 조회 1,165
10년 전 조회 1,060
10년 전 조회 1,146
10년 전 조회 1,119
10년 전 조회 1,136
10년 전 조회 1,187
10년 전 조회 1,194
10년 전 조회 1,133
10년 전 조회 1,134
10년 전 조회 1,192
10년 전 조회 1,154
10년 전 조회 1,233
10년 전 조회 1,161
10년 전 조회 1,108
10년 전 조회 1,085
10년 전 조회 1,094
10년 전 조회 1,079
10년 전 조회 1,109
10년 전 조회 1,137
10년 전 조회 1,097
10년 전 조회 1,155
10년 전 조회 1,088
10년 전 조회 1,196
10년 전 조회 1,277
10년 전 조회 1,250
10년 전 조회 1,185
10년 전 조회 1,108
10년 전 조회 1,231
10년 전 조회 1,139
10년 전 조회 1,170
10년 전 조회 1,111
10년 전 조회 1,098
10년 전 조회 1,094
10년 전 조회 1,119
10년 전 조회 1,213
10년 전 조회 1,155
10년 전 조회 1,244