html:

<select id="resultList">
<option >1班</option>
<option >2班</option>
<option >3班</option> </select>

js:

var mySelect = document.getElementById("resultList");
var mySelectText = mySelect.options[mySelect.selectedIndex].text;

获取select下拉列表选中的值的更多相关文章

  1. 用jquery获取单选按钮选中的内容 和 获取select下拉列表选中的值

    1.<label><input name='reason' type='radio' value='您的评论内容涉嫌谣言' />您的评论内容涉嫌谣言</label> ...

  2. 获取select标签选中的值

    js获取select标签选中的值 var obj = document.getElementById(”testSelect”); var index = obj.selectedIndex; var ...

  3. js获取select标签选中的值[转]

    var obj = document.getElementByIdx_x(”testSelect”); //定位id var index = obj.selectedIndex; // 选中索引 va ...

  4. 获取select标签选中的值的三种方式

    var obj = document.getElementByIdx_x(”testSelect”); //定位id var index = obj.selectedIndex; // 选中索引 va ...

  5. web 开发之js---js获取select标签选中的值

    var obj = document.getElementByIdx_x(”testSelect”); //定位id var index = obj.selectedIndex; // 选中索引 va ...

  6. js获取select标签选中的值及文本

    原生js方式: var obj = document.getElementByIdx_x(”testSelect”); //定位id var index = obj.selectedIndex; // ...

  7. js获取select标签选中的值

    <p>        城市:         <select id="Select1" name="D1">            &l ...

  8. jquery 获取select框选中的值示例一则

    $('#MODULE_TYPE').change(function(){ var moduleType=$(this).children('option:selected').val();//这就是s ...

  9. 获取select标签选中状态 的label的值。

    <select name="procode" onchange="alert(this.options[this.selectedIndex].text)" ...

随机推荐

  1. WIKIOI 3243 区间翻转

    3243 区间翻转 题目描述 Description 给出N个数,要求做M次区间翻转(如1 2 3 4变成4 3 2 1),求出最后的序列 输入描述 Input Description 第一行一个数N ...

  2. HTTP请求中的缓存(cache)机制

    http://www.chaorenmao.com/blog/?p=79 流程 当资源第一次被访问的时候,HTTP头部如下 (Request-Line)  GET /a.html HTTP/1.1Ho ...

  3. INTERRUPT CONTROLLER

    1,中断的基本概念 CPU与外设之间传输数据的控制方式通常有3种:查询方式,中断方式和DMA方式.查询方式的优点是硬件开销小不需要额外的硬件支持只是通过软件不断的轮询,使用起来也就比较简单,但在此方式 ...

  4. ashx文件结合ajax使用(返回json数据)

    ashx文件返回json数据: public void ProcessRequest(HttpContext context) { context.Response.ContentType = &qu ...

  5. 【HTML】Beginner2:page title

    1 page title </head>    contains information about the page </title> the title of the do ...

  6. Dynamic Vertex Buffers

    ynamic vertex buffers on the other hand allow us to manipulate the information inside the vertex buf ...

  7. PHP使用SwiftMailer发送邮件

    用到了swiftmailer 的lib库 官方网址:http://swiftmailer.org/ require_once 'lib/swift_required.php';//给我发送邮件func ...

  8. light oj 1148 - Mad Counting

    1148 - Mad Counting   PDF (English) Statistics Forum Time Limit: 0.5 second(s) Memory Limit: 32 MB M ...

  9. Ⅷ.spring的点点滴滴--抽象对象和子对象

    承接上文 抽象对象和子对象 .net篇(环境为vs2012+Spring.Core.dll v1.31) public class parent { public string Name { get; ...

  10. jquery中链式操作的this指向

    jquery中链式操作是如何实现? 例如:$(obj).children().css('color','red').next().css('color','red').siblings().css(' ...