用jquery得到select选中的值
<select class="pushtype" name="push_type" onchange="pushType(this)">
<option value="0">系統功能類</option>
<option value="1" selected=""selected"">營銷活動類</option>
</select>
function pushType(e) {
alert($('.pushtype option:selected').val());
alert($('.pushtype option:selected').text());
}
用jquery得到select选中的值的更多相关文章
- jquery获取select选中的值
http://blog.csdn.net/renzhenhuai/article/details/19569593 误区: 一直以为jquery获取select中option被选中的文本值,是这样写的 ...
- jquery 取得select选中的值
1.取得选中的值 jQuery("#select").val();是取得选中的值 2.取得的文本 jQuery("#select option:selected&quo ...
- jquery 获取select选中的值
获取选中的名称:$("#selectPinType option:selected").text(); 获取选中的值:$("#selectPinType option:s ...
- jQuery取得select选中的值
$("#sxselect").change(function(){ alert($("#sxselect option:selected").val()); } ...
- jQuery如何获得select选中的值?input单选radio选中的值
jQuery取得select选中的值 本来以为jQuery("#select1").val();是取得选中的值, 那么jQuery("#select1").te ...
- jquery操作select(选中,取值)
最近工作中总出现select 和 option问题,整理一下,内容大部分源于网络资料 一.基础取值问题 例如<select class="selector"></ ...
- jquery获取select选中的文本值
误区: 一直以为jquery获取select中option被选中的文本值,是这样写的: $("#id").text(); //获取所有option的文本值 实际上应该这样: ...
- [转]jquery设置select选中,赋值等操作
一.基础取值问题 例如<select class="selector"></select> 1.设置value为pxx的项选中 $(".selec ...
- Jquery获取select选中的文本与值
jquery获取select选择的文本与值获取select :获取select 选中的 text : $("#ddlregtype").find("option:s ...
随机推荐
- day5.am--拷贝构造与拷贝赋值
Array& operator = Array(Array const& that){ //避免自赋值 if(&that != this){ //释放旧资源 if(m_arra ...
- HRBUST 1186 青蛙过河 (思路错了)
在河上有一座独木桥,一只青蛙想沿着独木桥从河的一侧跳到另一侧.在桥上有一些石子,青蛙很讨厌踩在这些石子上.由于桥的长度和青蛙一次跳过的距离都是正整数,我们可以把独木桥上青蛙可能到达的点看成数轴上的一串 ...
- script利用src引用外部js文件,如果内部嵌套了js代码呢
<script src='test.js' defer async> var a = 5; </script> 这个时候 var a = 5;会被忽略.
- js中字符串和正则相关的方法
正则表达式对象常用方法 test() 检索字符串中指定的值.返回 true 或 false. var str="Embrace You" var r1=/you/i.test(st ...
- 2015-10-12 jQuery4
十. 直接获取.编辑内容 1.获取内容 alert($("#d1").text()); //获取文本内容 alert($("#d1").html()); ...
- linux学习--目录处理命令
- Win10系列:C#应用控件基础17
Popup控件 在应用程序中使用Popup控件时,通常会先将其设置为隐藏状态,当用户触发应用中已定义的事件时,Popup控件将以弹出窗口的方式显示相关信息来提示用户操作. 在XAML文件中,Popup ...
- encodeURIComponent编码与解码
问题:JavaScript用encodeURIComponentt编码后无法再后台解码的问题. 目前写法: window.self.location="list.jsp?searchtext ...
- 对TCP协议握手的理解(转)
reference:https://www.cnblogs.com/awkflf11/p/9191708.html 目录: 31.Tcp握手的一些问题? 21.Tcp三次握手及SYN攻击: 四次握手? ...
- ipone 5s上,字体rem遇到的问题
webapp中,12px的字体,利用rem实现自适应布局, 发现只有在ipone 5s中字体超大, 这两个class元素中字体一样大小,发现上面元素字体在ipone 5s中很大, 后来验证问题在哪里, ...