parserr..
5
如果html设置正确,则您的代码可以正常工作。这是我的测试html(使用php),因此您可以将其与自己的进行比较。
if (!empty($_POST)) {
die("
" . print_r($_POST, true) . "");
}
?>
ajax submit testjQuery.noConflict();
jQuery(document).ready(function ($) {
var $form = $('#default_contact');
$form.submit(function () {
$.ajax({
type: 'POST',
url: $form.attr('action'),
data: $form.serialize(),
success: function (response) {
alert(response);
}
});
return false;
});
});