我正在使用字句,并在案文投入价值大于40时试图传递信息。
<input type="text" name="quantity" size="2" value="<?php echo wpsc_cart_item_quantity(); ?>" />
Now i want to throw a message (alert) when this text field contains value greater than 40 and also want to reset its value to My wordpress theme uses jquery 1.71 I am doing the following:
jQuery("input[type= text ][name= quantity ]").change(function() {
if (this.val >= 41) {
alert("To order quantity greater than 40 please use the contact form.");
this.val == ;
this.focus();
return false;
}
});
感谢。