Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

preventdefault 0

$('#test').on("keypress",function (evt) {
   if (this.value.length == 1 && evt.which == 48 )
   {
      evt.preventDefault();
   }
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #preventdefault
ADD COMMENT
Topic
Name
1+9 =