html
<div class="page-header"> <div class="form-horizontal"> <div class="control-label col-lg-0"> </div> <div class="col-lg-2"> <select class="form-control" onchange="selectOnchang(this)"> <option>所有申请商家</option> <option>待审核商家</option> <option>未通过审核商家</option> <option>已通过审核商家</option> </select> </div> </div>
js
function selectOnchang(obj){ alert(obj.selectedIndex); //获取被选中的option标签选项 索引 alert(obj.options[obj.selectedIndex].value); //获取被选中的value值 }
Last updated 1 year ago