我使用此代码查看捐赠的价值是否高于 30,然后要求运输,如果不是,则不要求运输,但是当我输入的价值小于 30 时,贝宝不会通过
function askShipping(){
var amount = $("#amount").val();
if(amount == ''){
alert('Please enter Donation amount');
return false;
}
if(amount >= 30){
var ret = shipSuccess();
return false;
}
return false;
}
function shipSuccess(){
$( "#dialog:ui-dialog" ).dialog( "destroy" );
$( "#dialog-success" ).dialog({
height: 260,
modal: true,
buttons: {
"yes": function(){
$( this ).dialog( "close" );
shippingForm();
// document.donationForm.submit();
},
Cancel: function() {
$( this ).dialog( "close" );
document.donationForm.submit();
}
}
});
}