Auto Saving Form when Select field is changed

Can someone let me know how I could auto save a form when a select field is changed? i tried Sc_commit_trans, and also creating a java function function

sc_form_onload()
{
setInterval(function(){
nm_atualiza (‘alterar’);
}, 300000);
}

You need to use Javascript/jQuery
Basically you click button Save in response to a change event of the select field

what js code should i use?