這些有什麼區別,我怎麼知道什麼時候用哪個?這些POST命令有什麼區別?
$.post($(this).attr('action'), $(this).serialize(), function(response) {
// do something here on success
}, 'json');
$.post($(this).prop('action'), $(this).serialize(), function(response) {
// do something here on success
}, 'json');
$.post($(this).closest("form").prop('action'), $(this).serialize(), function(response) {
// do something here on success
}, 'json');