I would like to create a js function, to check if a select field of my form has changed. I created the function below to check if an input has changed and it works, but it does not work for select.
var alterado = false;
$(document).ready(function(e) {
$('input').keypress(function(){
alterado = true;
})
});