> For the complete documentation index, see [llms.txt](https://close.gitbook.io/yun-wei-bi-ji/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://close.gitbook.io/yun-wei-bi-ji/centos/bootstrap/bootstrap-zhong-guan-yu-select-xia-la-kuang-xuan-ze-chu-fa-shi-jian.md).

# BootStrap中关于Select下拉框选择触发事件

* html

  ```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

```js
function selectOnchang(obj){ 

alert(obj.selectedIndex);                      //获取被选中的option标签选项 索引
alert(obj.options[obj.selectedIndex].value);   //获取被选中的value值
}
```
