COMING SOON 🚀

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

· 10년 전 · 1393

<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,471
9년 전 조회 1,573
9년 전 조회 1,510
9년 전 조회 1,565
9년 전 조회 1,668
9년 전 조회 1,479
10년 전 조회 1,499
10년 전 조회 1,504
10년 전 조회 1,626
10년 전 조회 1,484
10년 전 조회 1,592
10년 전 조회 1,422
10년 전 조회 1,501
10년 전 조회 1,324
10년 전 조회 1,546
10년 전 조회 1,350
10년 전 조회 1,377
10년 전 조회 1,488
10년 전 조회 1,393
10년 전 조회 1,421
10년 전 조회 1,351
10년 전 조회 1,760
10년 전 조회 1,796
10년 전 조회 1,757
10년 전 조회 1,717
10년 전 조회 1,497
10년 전 조회 1,632
10년 전 조회 1,787
10년 전 조회 1,490
10년 전 조회 1,791
10년 전 조회 1,750
10년 전 조회 2,135
10년 전 조회 1,740
10년 전 조회 1,947
10년 전 조회 1,575
10년 전 조회 1,705
10년 전 조회 1,430
10년 전 조회 1,487
10년 전 조회 1,551
10년 전 조회 1,542
10년 전 조회 1,689
10년 전 조회 1,466
10년 전 조회 1,488
10년 전 조회 1,454
10년 전 조회 1,399
10년 전 조회 1,468
10년 전 조회 1,280
10년 전 조회 1,348
10년 전 조회 1,253
10년 전 조회 1,394
10년 전 조회 1,340
10년 전 조회 1,816
10년 전 조회 1,290
10년 전 조회 1,262
10년 전 조회 1,516
10년 전 조회 1,325
10년 전 조회 1,299
10년 전 조회 1,305
10년 전 조회 1,245
10년 전 조회 1,174
10년 전 조회 1,158
10년 전 조회 1,250
10년 전 조회 1,252
10년 전 조회 1,185
10년 전 조회 1,083
10년 전 조회 1,166
10년 전 조회 1,141
10년 전 조회 1,156
10년 전 조회 1,210
10년 전 조회 1,216
10년 전 조회 1,156
10년 전 조회 1,161
10년 전 조회 1,209
10년 전 조회 1,169
10년 전 조회 1,251
10년 전 조회 1,175
10년 전 조회 1,123
10년 전 조회 1,103
10년 전 조회 1,117
10년 전 조회 1,103
10년 전 조회 1,124
10년 전 조회 1,155
10년 전 조회 1,118
10년 전 조회 1,174
10년 전 조회 1,108
10년 전 조회 1,206
10년 전 조회 1,293
10년 전 조회 1,265
10년 전 조회 1,207
10년 전 조회 1,128
10년 전 조회 1,247
10년 전 조회 1,157
10년 전 조회 1,181
10년 전 조회 1,133
10년 전 조회 1,113
10년 전 조회 1,110
10년 전 조회 1,131
10년 전 조회 1,226
10년 전 조회 1,166
10년 전 조회 1,254