Skip to content

Instantly share code, notes, and snippets.

@housemeow
Created October 13, 2015 13:24
Show Gist options
  • Select an option

  • Save housemeow/4d9f2329a08b4125f2d9 to your computer and use it in GitHub Desktop.

Select an option

Save housemeow/4d9f2329a08b4125f2d9 to your computer and use it in GitHub Desktop.
$(function() {
$("button#submit").click(function() {
$.ajax({
url: "http://54.148.46.112:5000/keep",
type: "POST",
crossDomain:true,
data: $("form#user").serialize(),
error: function(message) {
alert("錯誤發生!" + message);
},
success: function(message) {
alert("感謝填表!");
$("form#user")[0].reset();
}
});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment