I have tried numerous things and nothing seems to be working.
我正在使用jQuery和 Select 的插件.
我try 过的方法:
var select = jQuery('#autoship_option');
select.val(jQuery('options:first', select).val());
jQuery('#autoship_option').val('');
jQuery('#autoship_option').text('');
jQuery('#autoship_option').empty('');
jQuery("#autoship_option option[value='']").attr('selected', true);
It always shows the Active Autoship option once it has been selected. I can't seem to get it to clear the selection.
以下是 Select 框:
<select id="autoship_option" data-placeholder="Choose Option..."
style="width: 175px;" class="chzn-select">
<option value=""></option>
<option value="active">Active Autoship</option>
</select>
是否有人熟悉Selected并能用一个选项清除SelectBox?(future 将有更多 Select .