<!--貼上html代碼--> <select id="ddlState" name="ddlState" class="easyui-combobox" data-options="panelHeight:45,editable:false" style="width: 80px;"> <option value="0">正常</option> <option value="1">下架</option></select>//在網(wǎng)上找到了一種方法,但有問題 function a() { var itemState = document.getElementById("ddlState"); var index = itemState.selectedIndex; State = itemState.options[index].value; alert("state:" + State); alert("index:" + index) }
EasyUI HTML頁面的 <select> 標(biāo)簽用作 combobox,怎樣獲取到選中項(xiàng)的值?
一只萌萌小番薯
2019-02-13 17:14:30