Answer:
Put this code in script tags and you'll be only able to enter only integer values in the input box.
$(document).ready(function(){
$("input").keyup(function(){
$(this).val( $(this).val().replace(/[^0-9]+/, '') );
if($(this).val() == ''){
$(this).val(0);
}
});
});
No comments:
Post a Comment