JQUERY/소스코드

jquery input text 숫자만 입력 받기

nineDeveloper 2015. 7. 28. 13:10
728x90
반응형

jquery부분

------

$(document).on("keyup", "input:text[numberOnly]", function() {$(this).val( $(this).val().replace(/[^0-9]/gi,"") );});

 

-----------

 

 

 

html 부분

----------------------------

<input type="text" name="BIZ_NO" id="BIZ_NO1" maxlength="3" numberonly="true"> -

 

jquery작성후 input 옵션에 numberonly를 주면 된다.

 

 

-------

 

// style="ime-mode:disabled;" 이건 한글만 못쓰게 만드는 구문 -!!

 

728x90
반응형