I have the following list that is present to the user
<select id="regions" multiple="multiple">
<option value= us-west selected="selected">US West Coast</option>
<option value= us-east selected="selected">US East Coast</option>
<option value= eur selected="selected">Europe</option>
<option value= asia selected="selected">Asia</option>
</select>
如上文所述,所有项目均选定。
I was trying to implement a jquery function where if the user clicks an option on the list only the clicked item (let s say Europe) will be removed, while the rest of the options are selected. I know that this is possible by holding down "CTRL" and clicking, but is there a way where all the user has to do is to click?
我行使这一职能:
<script type="text/javascript">
function(){
$("#regions options:selected").removeAttr("selected");
};
</script>