<form action="" name="test_form">
<input type="text" value="1" name="test" />
<input type="submit" value="ok" name="submit_test" />
</form>
<div></div>$(document).ready(function(){
$('form').on('submit', function(event){
event.preventDefault();
msg = $(this).serialize();
$('div').html(msg);
});
});<input type="hidden" value="ok" name="submit_test" /> <form action="" name="test_form">
<input type="text" value="1" name="test" />
<button value="button_1_value"> button_1 </button>
<button value="button_2_value"> button_2 </button>
</form>$(document).ready(function(){
$('form').find('button').on('click', function(event){
event.preventDefault();
msg = $(this).parent('form').serialize();
$('div').html(msg + " " + $(this).val());
});
});