Skip to content

Instantly share code, notes, and snippets.

Created October 5, 2015 06:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/0546d2c1ad164c10bdc9 to your computer and use it in GitHub Desktop.
Save anonymous/0546d2c1ad164c10bdc9 to your computer and use it in GitHub Desktop.
AJAX testing
$(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