javascript获取select的值全解
来源:互联网 发布:杨梅网络 编辑:程序博客网 时间:2024/05/23 22:55
获取显示的汉字
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="" selected="selected">ajax实验</option>
<option value="4">我适宜市哈</option>
</select>
使用
document.getElementById("bigclass").options[window.document.getElementById("bigclass").selectedIndex].text
的结果是:我适宜市哈
使用
window.document.getElementById("bigclass").value
的结果是:4
使用
window.document.getElementById("bigclass").selectedIndex
的结果是:1
- javascript获取select的值全解
- javascript获取select的值全解
- javascript获取select的值全解
- javascript获取select的值全解
- javascript获取select的值全解
- javascript获取select的值全解
- javascript获取select的值全解
- javascript获取select的值全解
- javascript获取select的值全解
- javascript获取select的值全解
- javascript获取select的值全解
- javascript获取select的值全解
- javascript获取select的值全解
- javascript获取select的值
- javascript获取select的值
- 如何用javascript获取select的值
- JavaScript获取select-option 的文本值
- JavaScript获取select-option 的文本值
- 把以',' 分隔的列转换为行,读取出来
- memset、memcpy、strcpy
- 2010/6/21(二) kaedeアプリケーション
- 验证手机号码和EMAIL
- 如何实现SAP跨系统取数
- javascript获取select的值全解
- ICEfaces学习一
- ASP中VBScript中的一些常见错误提示
- javascript魔力的经典代码
- MAM浅析
- js中英文字符串长度 js中英文字符串截取(转)
- 2010/6/21(三) Summaryしようか
- heap sort
- 中国大学生就业指南