What is the best way to restrict "number"-only input for textboxes?
jQuery(document).ready(function($){
jQuery('.test').keyup(function () {
this.value = this.value.replace(/[^0-9]/g,'');
});
});
<!-- http://stackoverflow.com/questions/891696/jquery-what-is-the-best-way-to-restrict-number-only-input-for-textboxes-all/11890073#11890073 -->
<input type="phone" name="quantity" class="test">