<!--贴上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>//在网上找到了一种方法,但有问题 function a() { var itemState = document.getElementById("ddlState"); var index = itemState.selectedIndex; State = itemState.options[index].value; alert("state:" + State); alert("index:" + index) }
添加回答
举报
0/150
提交
取消