jquery input value not greater then 3 code example
Example: jquery change input value if greater than
jQuery("input[type='text'][name='quantity']").change(function() {
if (parseInt($(this).val(),10) > 40) {
alert("To order quantity greater than 40 please use the contact form.");
this.value == '';
/* or with jQuery: $(this).val(''); */
$(this).focus();
return false;
}
});