Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Simple jQuery ajax request
function ajax() {
var msg = $(".register").serialize();
$.ajax({
type: "POST",
url: "./mail.php",
data: msg,
success: function(data) {
$('#results').html(data);
console.log('форма отправлена');
},
error: function(xhr, str) {
alert("Ошибка!");
}
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.