$(document).ready(function() {
//E-mail Ajax Send
$("form").submit(function() { //Change
var th = $(this);
$.ajax({
type: "POST",
url: "mail.php", //Change
data: th.serialize()
}).done(function() {
alert("Spasibo");
setTimeout(function() {
// The Done Functions
th.trigger("reset");
}, 1000);
});
return false;
});
});
$(document).ready(function() {
//E-mail Ajax Send
$("form").submit(function() { //Change
var th = $(this);
$.ajax({
type: "POST",
url: "mail.php", //Change
data: th.serialize()
}).done(function() {
document.location.href = "URL";
setTimeout(function() {
// The Done Functions
th.trigger("reset");
}, 1000);
});
return false;
});
});
window.location = 'https://toster.ru'
<?php
// do something with the form data
header("Location: https://toster.ru");
exit;
?>
Find more questions by tags JavaScriptjQuery