![](/img/trans.png)
[英]How do you change the selected option of a jquery selectric element using javascript?
[英]Bind Selectric jQuery Dropdown excluding option selected
我在網頁設計中使用selectric jQuery下拉列表:
<select id="RemoveReason">
<option value="0">Reason for Disconnect</option>
<option>Coverage</option>
<option>Price</option>
<option>Customer experience</option>
<option>Serviceability</option>
<option>Promotion</option>
<option>Limited Device range</option>
</select>
有了這個,我在默認選擇的選擇下拉列表中再次獲得了位於0位置的值。 你可以在這里找到圖片
誰能幫我解決這個問題? 提前致謝。
添加selected
和disabled
,我相信這是您所期望的。
<select id="RemoveReason">
<option value="0" selected disabled>Reason for Disconnect</option>
<option>Coverage</option>
<option>Price</option>
<option>Customer experience</option>
<option>Serviceability</option>
<option>Promotion</option>
<option>Limited Device range</option></select>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.