取得 Select 選中的 Text 與 Value:
1. $("#select_id").change(function(){...}); // 為 Select 添加事件,選擇其中一項時觸發
2. var checkText = $("#select_id").find("option:selected").text(); // 取得選中的 Text
3. var checkValue = $("#select_id").val(); // 取得選中的 Value
4. var checkIndex = $("#select_id").get(0).selectedIndex; // 取得選中的索引值
5. var maxIndex = $("#select_id option:last").attr("index"); // 取得最大的索引值
設置 Select 選中的 Text 與 Value:
1. $("#select_id").get(0).selectedIndex = 1; // 將索引值為 1 的項設為選中
2. $("#select_id").val(4); // 將 Value 為 4 的項設為選中
3. $("#select_id option[text='jQuery']").attr("selected", true); // 將 Text 為 jQuery 的項設為選中
添加/刪除 Select 的 Option 項:
1. $("#select_id").append("<option value='Value'>Text</option>"); // 追加一個選項
2. $("#select_id").prepend("<option value='0'>請選擇</option>"); // 在第一位插入一個選項
3. $("#select_id option:last").remove(); // 刪除最後一個選項
4. $("#select_id option[index='0']").remove(); // 刪除索引值為 0 的選項
5. $("#select_id option[value='3']").remove(); // 刪除 Value 為 3 的選項
6. $("#select_id option[text='4']").remove(); // 刪除 Text 為 4 的選項