获取select下拉列表选中的值
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下拉列表选中的值的更多相关文章
- 用jquery获取单选按钮选中的内容 和 获取select下拉列表选中的值
1.<label><input name='reason' type='radio' value='您的评论内容涉嫌谣言' />您的评论内容涉嫌谣言</label> ...
- 获取select标签选中的值
js获取select标签选中的值 var obj = document.getElementById(”testSelect”); var index = obj.selectedIndex; var ...
- js获取select标签选中的值[转]
var obj = document.getElementByIdx_x(”testSelect”); //定位id var index = obj.selectedIndex; // 选中索引 va ...
- 获取select标签选中的值的三种方式
var obj = document.getElementByIdx_x(”testSelect”); //定位id var index = obj.selectedIndex; // 选中索引 va ...
- web 开发之js---js获取select标签选中的值
var obj = document.getElementByIdx_x(”testSelect”); //定位id var index = obj.selectedIndex; // 选中索引 va ...
- js获取select标签选中的值及文本
原生js方式: var obj = document.getElementByIdx_x(”testSelect”); //定位id var index = obj.selectedIndex; // ...
- js获取select标签选中的值
<p> 城市: <select id="Select1" name="D1"> &l ...
- jquery 获取select框选中的值示例一则
$('#MODULE_TYPE').change(function(){ var moduleType=$(this).children('option:selected').val();//这就是s ...
- 获取select标签选中状态 的label的值。
<select name="procode" onchange="alert(this.options[this.selectedIndex].text)" ...
随机推荐
- 安装Visual Studio2015后,使用VS2013开发的项目,在IIS访问都提示“公共语言运行时检测到无效的程序”的解决办法
1.安装VS2015后,.NET Framework4.6会替换掉 C:\Windows\Microsoft.NET\Framework64\v4.0.30319 (如果使用的是windows7 64 ...
- Zookeeper的一致性协议:Zab(转)
Zookeeper使用了一种称为Zab(Zookeeper Atomic Broadcast)的协议作为其一致性复制的核心,据其作者说这是一种新发算法,其特点是充分考虑了Yahoo的具体情况:高吞吐量 ...
- XML常用颜色值
<?xml version="1.0" encoding="utf-8" ?> <resources> <color name=& ...
- 查看linux虚拟机ssh服务是否开启
知识准备: 1.ssh和sshd的区别: 2.ssh服务进程默认地址:/etc/init.d/ssh 查看ssh服务是否开启 service ssh status 或者: /etc/init.d/ss ...
- ThinkPadTablet如何恢复出厂状态
ThinkPad Tablet恢复出厂操作教程: 第一步:开机看到“LENOVO”图标后不停按机器侧面音量增大键,直到出现“Booting recovery kernel image”字样. 第二步: ...
- leecode single numer
http://www.acmerblog.com/leetcode-single-number-ii-5394.html acm之家的讲解总是那么到位 public class Solution { ...
- POJ 3468 A Simple Problem with Integers 线段树 区间更新
#include<iostream> #include<string> #include<algorithm> #include<cstdlib> #i ...
- T-SQL XQuery (XML路径查询) (转)http://blog.csdn.net/Beirut/article/details/8150116
/* T-SQL 支持用于查询 XML 数据类型的 XQuery 语言的子集. XQuery 基于现有的 XPath 查询语言,并支持更好的迭代.更好的排序结果以及构造必需的 XML 的功能. 在前面 ...
- Weka 入门3
这次我们介绍Evaluation类.在上一次中我们只是单纯的预测了分类值,并没有其他评价数据.这场我们使用Evalution类.首先初始化一个Evaluation对象,Evaluation类没有无参的 ...
- Web Services and C# Enums -摘自网络
Web Service Transparency .NET support for web services is excellent in creating illusion of transpar ...