100字范文,内容丰富有趣,生活中的好帮手!
100字范文 > javascript获取select的当前值示例代码(兼容IE/Firefox/Opera/Chrome)【javascript】

javascript获取select的当前值示例代码(兼容IE/Firefox/Opera/Chrome)【javascript】

时间:2022-09-28 18:26:21

相关推荐

javascript获取select的当前值示例代码(兼容IE/Firefox/Opera/Chrome)【javascript】

web前端|js教程

select,javascript

web前端-js教程

JavaScript获取Select当前值写法:

var value = document.getElementById(“select”).options[document.getElementById(“select”).options.selectedIndex].value;

var text = document.getElementById(“select”).options[document.getElementById(“select”).options.selectedIndex].text;

例子:

php源码加密授权工具,ubuntu如何访问外网,爬虫能实现什么,php euccn,小陶seo博客lzw

function check() {

var select = document.getElementById("select").options[document.getElementById("select").options.selectedIndex].value;

alert(select);

}

Test1

Test2

网站下载器源码,vscode元素样式提示,使用ubuntu很卡,tomcat支持多个证书,麂皮爬虫,php 支付宝 签名验证,徐汇seo优化哪里有,在线免费算命网站源码,帝国 ecms081模板lzw

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。