简体   繁体   中英

Fire jquery event when a new dropdown value gets set

I have 2 options in the dropdown.

<select id="_fid_140" onchange="chooseRecordPicker()" >
<option value="736">9000000146</option>
<option value="x3recpcker#">&lt; Browse choices... &gt;</option>

After clicking on Browse choices, a new window opens, I make a selection there, I hit save. The options in the dropdown change to

 <option value="740">9000000140</option>
 <option value="x3recpcker#">&lt; Browse choices... &gt;</option>

I want an event to be fired after "a new value has been set" in the dropdown.

$('select').change(function(){
    //Run your function here. 
});

This function will run when the dropdown menu selected option has been changed.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM