JQUERY VS Select控制項

下拉之後的值

$("#ID option:selected").text();

移除選項

$("#ID option:selected").remove();

設定某選項

$("#selectID").children().each(function(){
if ($(this).text()=="option name")
$(this).attr("selected","true");
});

You May Also Like

About the Author: 小布

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。

這個網站採用 Akismet 服務減少垃圾留言。進一步了解 Akismet 如何處理網站訪客的留言資料