jQuery对下拉框Select操作总结
来源:互联网 发布:开网络出租屋赚钱吗 编辑:程序博客网 时间:2024/05/23 01:21
转自网络,留做备用
jQuery获取Select元素,并选择的Text和Value:
1. $("#select_id").change(function(){//code...}); //为Select添加事件,当选择其中一项时触发
2. var checkText=$("#select_id").find("option:selected").text(); //获取Select选择的Text
3. var checkValue=$("#select_id").val(); //获取Select选择的Value
4. var checkIndex=$("#select_id ").get(0).selectedIndex; //获取Select选择的索引值
5. var maxIndex=$("#select_id option:last").attr("index"); //获取Select最大的索引值
0 0
- jQuery对下拉框Select操作总结
- jQuery对下拉框Select操作总结
- jQuery对下拉框Select操作总结
- jQuery对下拉框Select操作总结
- jQuery对下拉框Select操作总结
- jquery对html中的下拉框select的操作
- jQuery中对select下拉框的基本操作
- jquery对select下拉框的一些基本操作
- jquery对select下拉框的基本操作大全
- Jquery对select 下拉列表的操作
- jquery select下拉框操作
- jquery操作下拉框select
- jquery操作select下拉框
- jquery操作下拉框select
- jQuery操作select下拉框
- Jquery 操作select下拉框
- jq:对下拉框select的操作的总结
- jquery 对select的操作总结
- Matlab如何安装新的工具箱
- 汇编学习2--语言基础
- 嵌入式Linux ALSA工具交叉编译问题解决
- ZOJ 3930 Dice Notation【模拟】【字符串】
- STM32存储字符串
- jQuery对下拉框Select操作总结
- nginx windows No mapping for the Unicode character...
- C++基本语法-----copy
- 调试案例1--游戏公告突然没了
- Android Studio配置
- 刷题第二天:南邮NOJ第几天
- win7下myeclipse 9.0破解(图解)
- 堆和栈的区别(转过无数次的文章)
- 嵌套虚拟化整理