How to find all the selected items that have changed?


let's say I have a form that contains several "select" element that the User can choose. when ready to submit, I need to find all the "select" that have changed. how can I do it?

for example:

    <input type="text" name="a"/>
    <select name="b">...</select>
    <select name="c">...</select>
    <select name="d">...</select>

Using jQuery, something like this should work:

$('select').change(function() {

$('form').submit(function() {
    var changed_selects = $('select.changed');
    // do what you want with the changed selects