jQuery查询select框中的值
来源:互联网 发布:国外足球预测网站 知乎 编辑:程序博客网 时间:2024/06/05 07:50
用jQuery查找select框下option中value值和显示的值。
代码如下:
<!DOCTYPE html><html><head><meta charset="utf-8"><title>菜鸟教程(runoob.com)</title><script src="http://cdn.static.runoob.com/libs/jquery/1.10.2/jquery.min.js"></script><script>$(document).ready(function(){ $("button").on("click",function(){ debugger; var aa = $("#test1").val(); alert(aa); var bb = $("#test1").find("option:selected").text(); alert(bb); });}); </script></head><body><select id="test1"> <option value="1">第一行</option> <option value="2">第二行</option> <option value="3">第三行</option></select><button>点我</button></body></html>
阅读全文
0 0
- jQuery查询select框中的值
- jQuery取select框中的值
- jquery获取select中的值
- 使用jquery ui 实现select 查询框
- jQuery设置select中选中的值
- jquery中的select操作
- T-SQL中的Select查询
- Mysql中的select查询操作
- JQuery中的select用法总结
- JQuery操作select中的option
- 查询select中选中的值bootstrao+Vue.js+spring
- jquery对html中的下拉框select的操作
- jQuery 实现 select模糊查询 反射机制
- jquery获取select中的option的text值
- jquery获取select中的option的text值
- jquery获取select中的option的text值
- jquery获取select中的option的text值
- jquery select search select快速查询定位插件
- Bandwidth UVA
- elasticsearch2.1.0 curl 相关操作命令(一)
- Python网络数据采集
- 嵌入式系统
- Ajax常用请求方式
- jQuery查询select框中的值
- http-----cors理解
- Spring mvc,jQuery和JSON数据交互
- [最大权闭合子图] BZOJ4873: [Shoi2017] 寿司餐厅
- 如何在 Linux下从普通用户切换到root用户
- 银行卡识别-微信支付你不知道的秘密
- js实现简单的导航下拉菜单
- Java Keytool 生成 keystore 命令
- ava 前端加密传输后端解密以及验证码功能