Created
February 12, 2017 17:30
-
-
Save mrfratello/d47b495fb62b0227341bd852748c5fe6 to your computer and use it in GitHub Desktop.
html template with example of ajax-request using jQuery library.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>AJAX on jQuery Example</title> | |
</head> | |
<body> | |
<script type="text/javascript" src="https://code.jquery.com/jquery-1.7.2.min.js"></script> | |
<script type="text/javascript"> | |
jQuery.ajax({ | |
url: '/some_page', | |
method: 'POST', | |
data: { | |
foo: 'bar', | |
hello: 'world' | |
}, | |
complete: function() { | |
console.log('ajax is sended'); | |
} | |
}); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment