COMING SOON 🚀

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

· 10년 전 · 1387

<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,570
9년 전 조회 1,505
9년 전 조회 1,564
9년 전 조회 1,663
9년 전 조회 1,476
9년 전 조회 1,498
10년 전 조회 1,502
10년 전 조회 1,625
10년 전 조회 1,483
10년 전 조회 1,589
10년 전 조회 1,421
10년 전 조회 1,500
10년 전 조회 1,323
10년 전 조회 1,543
10년 전 조회 1,349
10년 전 조회 1,375
10년 전 조회 1,485
10년 전 조회 1,390
10년 전 조회 1,418
10년 전 조회 1,348
10년 전 조회 1,758
10년 전 조회 1,794
10년 전 조회 1,756
10년 전 조회 1,715
10년 전 조회 1,497
10년 전 조회 1,631
10년 전 조회 1,785
10년 전 조회 1,486
10년 전 조회 1,787
10년 전 조회 1,745
10년 전 조회 2,131
10년 전 조회 1,736
10년 전 조회 1,947
10년 전 조회 1,573
10년 전 조회 1,702
10년 전 조회 1,427
10년 전 조회 1,484
10년 전 조회 1,550
10년 전 조회 1,539
10년 전 조회 1,688
10년 전 조회 1,465
10년 전 조회 1,485
10년 전 조회 1,449
10년 전 조회 1,396
10년 전 조회 1,468
10년 전 조회 1,278
10년 전 조회 1,346
10년 전 조회 1,248
10년 전 조회 1,388
10년 전 조회 1,336
10년 전 조회 1,815
10년 전 조회 1,290
10년 전 조회 1,257
10년 전 조회 1,515
10년 전 조회 1,321
10년 전 조회 1,297
10년 전 조회 1,303
10년 전 조회 1,245
10년 전 조회 1,167
10년 전 조회 1,157
10년 전 조회 1,250
10년 전 조회 1,250
10년 전 조회 1,181
10년 전 조회 1,081
10년 전 조회 1,164
10년 전 조회 1,139
10년 전 조회 1,156
10년 전 조회 1,205
10년 전 조회 1,213
10년 전 조회 1,150
10년 전 조회 1,155
10년 전 조회 1,206
10년 전 조회 1,169
10년 전 조회 1,248
10년 전 조회 1,172
10년 전 조회 1,121
10년 전 조회 1,100
10년 전 조회 1,113
10년 전 조회 1,100
10년 전 조회 1,121
10년 전 조회 1,148
10년 전 조회 1,115
10년 전 조회 1,174
10년 전 조회 1,104
10년 전 조회 1,205
10년 전 조회 1,290
10년 전 조회 1,264
10년 전 조회 1,203
10년 전 조회 1,126
10년 전 조회 1,246
10년 전 조회 1,154
10년 전 조회 1,177
10년 전 조회 1,133
10년 전 조회 1,111
10년 전 조회 1,109
10년 전 조회 1,128
10년 전 조회 1,224
10년 전 조회 1,162
10년 전 조회 1,252