$('#mySelect')
.find('option')//找到option的元素
.remove()//刪除
.end()//結束
.append('<option value="whatever">text</option>')//新增一個元素
.val('whatever')//設定選取此元素
;
全站熱搜
$('#mySelect')
.find('option')//找到option的元素
.remove()//刪除
.end()//結束
.append('<option value="whatever">text</option>')//新增一個元素
.val('whatever')//設定選取此元素
;
留言列表