这就是我所拥有的,表格仍然进入页面?我从凌晨 1 点起就一直在努力解决它!帮助!
function del_entry() {
$('.delete_deal').submit(function() {
var $g = $(this);
$.ajax({
url: $g.attr('action'),
type: $g.attr('method'),
data: $g.serializeArray(),
cache: false,
});
});
return false;
}; //end del_entry
并以我的形式:
<form name="delete_deal" action="inactivate_deal.php" class="delete_deal" method="post">
<a href="#" class="button" onClick="$('#deal_div_id').fadeOut(); del_entry();">Delete</a></form>