jQuery를 사용하여 input 상자에 숫자만 허용하는 방법


jQuery를 사용하여 input 상자에 숫자만 허용하는 방법

출처 : https://stackoverflow.com/questions/995183/how-to-allow-only-numeric-0-9-in-html-inputbox-using-jquery inputFilter 플러그인을 사용한다. 1. plugin 코드 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 // Restricts input for each element in the set of matched elements to the given inputFilter. (function($) { $.fn.inputFilter = function(inputFilter) { return this.on("input keydown keyup mousedown mouseup select contextmenu drop", function() { if (inputFilter(this.value)) { this.oldValue = this.value; this.oldSelectio...


#filter #jquery #mask

원문링크 : jQuery를 사용하여 input 상자에 숫자만 허용하는 방법