Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <li><a href="#newgame" onclick="yourAJAXFunction()" id="linknewgame">Jouer</a></li>
- function yourAJAXFunction(){
- $.ajax({
- url: "http://localhost/api/pages/newgame",
- method: "GET",
- data: "token=3660935154fe3d7e9612466f6e70fbe6",
- dataType: 'json',
- success: function(json) {
- console.log(json);
- $("#response").append("<p><b>Page title: " + json.data.content+"</p>");
- },
- error: function(data) {
- console.log("Error");
- }
- });
- }
Add Comment
Please, Sign In to add comment