Saturday, March 3, 2018

javascript - Running ajax call on specific form name

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

plot explanation - Why did Peaches' mom hang on the tree? - Movies & TV

In the middle of the movie Ice Age: Continental Drift Peaches' mom asked Peaches to go to sleep. Then, she hung on the tree. This parti...