COMING SOON 🚀

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

· 10년 전 · 1385

<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,504
9년 전 조회 1,563
9년 전 조회 1,663
9년 전 조회 1,472
9년 전 조회 1,497
10년 전 조회 1,500
10년 전 조회 1,625
10년 전 조회 1,482
10년 전 조회 1,587
10년 전 조회 1,418
10년 전 조회 1,499
10년 전 조회 1,320
10년 전 조회 1,543
10년 전 조회 1,349
10년 전 조회 1,374
10년 전 조회 1,482
10년 전 조회 1,390
10년 전 조회 1,416
10년 전 조회 1,345
10년 전 조회 1,757
10년 전 조회 1,789
10년 전 조회 1,755
10년 전 조회 1,714
10년 전 조회 1,496
10년 전 조회 1,630
10년 전 조회 1,782
10년 전 조회 1,482
10년 전 조회 1,787
10년 전 조회 1,744
10년 전 조회 2,130
10년 전 조회 1,733
10년 전 조회 1,945
10년 전 조회 1,573
10년 전 조회 1,699
10년 전 조회 1,425
10년 전 조회 1,482
10년 전 조회 1,548
10년 전 조회 1,537
10년 전 조회 1,686
10년 전 조회 1,464
10년 전 조회 1,483
10년 전 조회 1,449
10년 전 조회 1,396
10년 전 조회 1,467
10년 전 조회 1,275
10년 전 조회 1,346
10년 전 조회 1,247
10년 전 조회 1,386
10년 전 조회 1,333
10년 전 조회 1,814
10년 전 조회 1,288
10년 전 조회 1,257
10년 전 조회 1,515
10년 전 조회 1,320
10년 전 조회 1,297
10년 전 조회 1,301
10년 전 조회 1,245
10년 전 조회 1,167
10년 전 조회 1,157
10년 전 조회 1,249
10년 전 조회 1,249
10년 전 조회 1,180
10년 전 조회 1,081
10년 전 조회 1,164
10년 전 조회 1,139
10년 전 조회 1,156
10년 전 조회 1,204
10년 전 조회 1,212
10년 전 조회 1,147
10년 전 조회 1,154
10년 전 조회 1,206
10년 전 조회 1,169
10년 전 조회 1,247
10년 전 조회 1,171
10년 전 조회 1,120
10년 전 조회 1,100
10년 전 조회 1,111
10년 전 조회 1,100
10년 전 조회 1,121
10년 전 조회 1,146
10년 전 조회 1,114
10년 전 조회 1,173
10년 전 조회 1,103
10년 전 조회 1,205
10년 전 조회 1,289
10년 전 조회 1,263
10년 전 조회 1,202
10년 전 조회 1,125
10년 전 조회 1,246
10년 전 조회 1,151
10년 전 조회 1,177
10년 전 조회 1,131
10년 전 조회 1,110
10년 전 조회 1,109
10년 전 조회 1,128
10년 전 조회 1,223
10년 전 조회 1,161
10년 전 조회 1,250