Skip to content

Instantly share code, notes, and snippets.

@conanak99

conanak99/ajax_callback.js Secret

Last active Jun 22, 2016
Embed
What would you like to do?
// Truyền callback vào hàm ajax
var callback = function(image){
console.log(image);
};
ajax.get("gaixinh.info", callback);
// Có thể viết gọn như sau
ajax.get("gaixinh.info", function(image) {
console.log(image);
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment