I just wanted to know how I can run a function on a specific form name? instead of just any form.. my code is below you don't really need to know anything else, its for an ajax call.
$('form').on('submit', function (e) {
e.preventDefault();
$.ajax({
type: 'post',
url: '/assets/hk/ajax/muteorban.php',
data: $('form').serialize(),
success: function (data) {
var div = document.getElementById('contentArea_muteorban');
div.innerHTML = div.innerHTML + data;
}
});
});
});
No comments:
Post a Comment