Created
October 5, 2015 06:27
-
-
Save anonymous/0546d2c1ad164c10bdc9 to your computer and use it in GitHub Desktop.
AJAX testing
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
$(document).ready( | |
ajaxtest(); | |
}); | |
function ajaxtest() | |
{ | |
var con; | |
$.ajax({ | |
url: 'count.php', | |
cache: false, | |
type:'POST', | |
async: false, | |
error: function(xhr) { | |
alert('Ajax request 發生錯誤'); | |
}, | |
success:function(response) { | |
response(con); | |
} | |
}); | |
} | |
function response(con){ | |
alert(con); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment