apache 学习笔记
2015-10-21 18:39
543 查看
javascript获取select的值全解
获取显示的汉字
document.getElementById("bigclass").options[window.document.getElementById("bigclass").selectedIndex].text
获取数据库中的id
window.document.getElementById("bigclass").value
获取select组分配的索引id
window.document.getElementById("bigclass").selectedIndex
例子:
<select name="bigclass" id="bigclass" onChange="javascript:updatePage2();">
<option value="3">ajax实验</option>
<option value="4" selected="selected">我适宜市哈</option>
</select>
使用
document.getElementById("bigclass").options[window.document.getElementById("bigclass").selectedIndex].text
的结果是:我适宜市哈
使用
window.document.getElementById("bigclass").value
的结果是:4
使用
window.document.getElementById("bigclass").selectedIndex
的结果是:1
出自:http://blog.csdn.net/mastermanager/article/details/2128671
获取显示的汉字
document.getElementById("bigclass").options[window.document.getElementById("bigclass").selectedIndex].text
获取数据库中的id
window.document.getElementById("bigclass").value
获取select组分配的索引id
window.document.getElementById("bigclass").selectedIndex
例子:
<select name="bigclass" id="bigclass" onChange="javascript:updatePage2();">
<option value="3">ajax实验</option>
<option value="4" selected="selected">我适宜市哈</option>
</select>
使用
document.getElementById("bigclass").options[window.document.getElementById("bigclass").selectedIndex].text
的结果是:我适宜市哈
使用
window.document.getElementById("bigclass").value
的结果是:4
使用
window.document.getElementById("bigclass").selectedIndex
的结果是:1
出自:http://blog.csdn.net/mastermanager/article/details/2128671
相关文章推荐
- Karaf 依赖equinox and felix,karaf 本Apache的很多项目作为基础框架
- CentOS7.1安装配置Apache+PHP+MySQL+PHPMyAdmin+Zend debugger
- Apache中 RewriteRule 规则参数介绍
- Exception in thread "main" java.lang.UnsatisfiedLinkError: org.apache.hadoop.io.nativeio.NativeIO$Wi
- DOS命令行中用apache-maven-3.3.3 构建Java和Java Web项目
- org.apache.jasper.JasperException: PWC6345: There is an error in invoking javac. A full JDK (not ju
- ubuntu环境下使用apt-get配置apache+php+mysql
- Apache 编 译 时 遇 到 的 错 误
- 用Apache的commons-modeler来辅助开发JMX
- Apache axis2 + Eclipse 开发 WebService
- 禁止Apache显示目录索引
- 解决编译apache出现的问题:configure: error: APR not found . Please read the documentation
- Apache服务器编译安装与简单配置
- 如何配置Apache服务器
- Apache PDFBox 2.0.0 RC1 发布下载
- win+Apache+mod_wsgi部署python程序-apache2.2+python2.7
- Java异常解决总结001-org.apache.jasper.JasperException: java.lang.IllegalStateException: No output fold
- 基于Apache搭建日志分析系统——AWstats日志分析软件
- ERROR actor.OneForOneStrategy: org.apache.spark.SparkContext
- Apache Maven 入门篇