jquery获取radio和select选中值
//jquery 获取radio选中值
<input type="radio" name="c_type" value="a" >aaaa
<input type="radio" name="c_type" value="b" >bbbb
<input type="radio" name="c_type" value="c" >cccc <script src="jquery-2.1.4.min.js"></script>
<script>
$('input[name="c_type"]').click( function () {
var item = $("input[name='c_type']:checked").val();
alert(item);
});
</script>
//jquery 获取select选中值
<select name="c_type" id="select">
<option value="a">aaaa</option>
<option value="b">bbbb</option>
<option value="c">cccc</option>
</select> <script src="jquery-2.1.4.min.js"></script>
<script>
$("#select").change(function(){
var item = $("#select option:selected").val();
alert(item);
});
</script>
jquery获取radio和select选中值的更多相关文章
- jQuery获取Radio选择的Value值||两个select之间option的互相添加操作(jquery实现)
jQuery获取Radio选择的Value值: 1. $("input[name='radio_name'][checked]").val(); //选择被选中Radio的Val ...
- 获取radio和select的值,获取select的值
获取radio的值 var val=$('input:radio[name="_objId"]:checked').val(); jQuery中获得选中select值 第一种方法$ ...
- jquery获取radio单选框的值
1.获取原有单选框的值 var value=$("input[name='is_setting']:checked").val(); 2.获取重选后的单选框的值 <tr> ...
- 使用jQuery获取radio/checkbox组的值的代码收集
<!-- $("document").ready(function(){ $("#btn1").click(function(){ $("[na ...
- jQuery获取循环中的选中单选按钮radio的值
1.<input type="radio" name="testradio" value="jquery获取radio的值" /> ...
- jquery获取radio选中值及遍历
使用jquery获取radio的值,最重要的是掌握jquery选择器的使用,在一个表单中我们通常是要获取被选中的那个radio项的值,所以要加checked来筛选,比如有以下的一些radio项:1.& ...
- 使用jquery获取radio的值
使用jquery获取radio的值,最重要的是掌握jquery选择器的使用,在一个表单中我们通常是要获取被选中的那个radio项的值,所以要加checked来筛选,比如有以下的一些radio项: ...
- jQuery获取radio选中后的文字
原文链接:http://blog.csdn.net/zhanyouwen/article/details/51393216 jQuery获取radio选中后的文字转载 2016年05月13日 10:3 ...
- JS 如何获取radio或者checkbox选中后的值
废话不多说,直接上代码: 代码: <!DOCTYPE html> <html> <head> <meta charset="UTF-8"& ...
随机推荐
- C语言宏定义时#(井号)和##(双井号)的用法1
#在英语里面叫做 pound 在C语言的宏定义中,一个#表示字符串化:两个#代表concatenate 举例如下: #include <iostream> void quit_comman ...
- 【Networking】Thrift and gRPC
参考资料: http://doc.oschina.net/grpc?t=60138 http://www.grpc.io/ https://thrift.apache.org/ https://git ...
- Reorder array to construct the minimum number
Construct minimum number by reordering a given non-negative integer array. Arrange them such that th ...
- cat -n与nl的区别
cat -n filename:空行也算一行 nl filename:空行不算一行
- 用C语言把双向链表中的两个结点交换位置,考虑各种边界问题。
用C语言把双向链表中的两个结点交换位置,考虑各种边界问题. [参考] http://blog.csdn.net/silangquan/article/details/18051675
- FFmpeg-20160415-snapshot-bin
ESC 退出 0 进度条开关 1 屏幕原始大小 2 屏幕1/2大小 3 屏幕1/3大小 4 屏幕1/4大小 S 下一帧 [ -2秒 ] +2秒 ; -1秒 ' +1秒 下一个帧 -> -5秒 F ...
- CentOS 7 关闭图形界面
CentOS 7 关闭图形界面 查看/etc/inittab如下: # systemd uses 'targets' instead of runlevels. # by default, there ...
- drupal记录(一)
翻译包下载网址:locallize.drupal.org 中文模块 local 自动下载模块 L10n_update 第三方menu菜单 admin menu,menu bar 打开这个后要关闭系统自 ...
- 汉企PHP开班
明天PHP正式开班,没什么大目标 ,在四个半月的时间吧基础知识掌握牢固,自信的面对企业.
- PHP如何随机获取一个二维数组中的一个值
获取一个数组: $awardid_list=pdo_fetchall('select id from '.tablename($this->table_award)); 这是微擎的写法哈,意思就 ...
