---
title: "js获取select显示值（转）"
author: "ljf_home"
date: "2015-03-10T15:29:47Z"
tags: []
categories: ["Web前端"]
slug: "js-select"
draft: false
lastmod: "2015-03-10T15:29:47Z"
id: 2191074
url: "https://rsy.iteye.com/blog/2191074"
---

```
<select   name="test" id="type">  
  <option   value="0">请选择</option>  
  <option   value="1">第一</option>  
  <option   value="2">第二</option>  
  <option   value="3">第三</option>  
  <option   value="4">第四</option>  
  </select> 
```

 若要获取显示值第一 第二 第三之类的

var selectIndex = document.getElementById("type").selectedIndex;//获得是第几个被选中了

var selectText = document.getElementById("type").options\[selectIndex].text //获得被选中的项目的文本

alert(selectText);//得到显示的值

 

转自：[http://blog.csdn.net/z294286540/article/details/7690932](http://blog.csdn.net/z294286540/article/details/7690932)