SMALL

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>


<script type="text/javascript">

  function maxLengthCheck(object){

    if (object.value.length > object.maxLength){

      object.value = object.value.slice(0, object.maxLength);

    }    

  }

  

</script>


<input type="number" maxlength="4" oninput="maxLengthCheck(this)"/>

출처 : http://milkye.tistory.com/265

LIST
블로그 이미지

SeoHW

,