jquery 获取radio被选中的值
<html> <head>
<script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.js"></script>
</head> <body> <div id="wrap">
<input type="radio" name="payMethod" value="1" />支付宝
<input type="radio" name="payMethod" checked value="2" />微信
</div> <script> /** 获取被选中按钮的值 **/
var val_payPlatform = $('#wrap input[name="payMethod"]:checked ').val(); console.log(val_payPlatform);
alert(val_payPlatform); </script> </body>
</html>
jquery 获取radio被选中的值的更多相关文章
- jQuery获取Radio选择的Value值||两个select之间option的互相添加操作(jquery实现)
jQuery获取Radio选择的Value值: 1. $("input[name='radio_name'][checked]").val(); //选择被选中Radio的Val ...
- jquery获取单选button选中的值
在页面上单选button的代码: <s:iterator value="@com.hljw.cmeav.util.CmeavGlobal@isComMap"> < ...
- Jquery 获取 radio/select选中值
Radio <input type="radio" name="rd" id="rd1" checked="checked& ...
- jquery 获取easyui combobox选中的值、赋值
jquery easyui combobox 控件支持单选和多选 1.获取选中的值 $('#comboboxlist').combobox('getValue'); //单选时 $('#combob ...
- 使用jQuery获取radio/checkbox组的值的代码收集
<!-- $("document").ready(function(){ $("#btn1").click(function(){ $("[na ...
- jquery获取radio单选框的值
1.获取原有单选框的值 var value=$("input[name='is_setting']:checked").val(); 2.获取重选后的单选框的值 <tr> ...
- jquery获取checkbox被选中的值
只用一个循环,就可以找出被选中的checkbox的值 var s; $("[name = b]:checkbox").each(function () { ...
- jquery 获取select框选中的值示例一则
$('#MODULE_TYPE').change(function(){ var moduleType=$(this).children('option:selected').val();//这就是s ...
- JQuery 获取checkbox被选中的值
html代码 <ul id="dxbox"> <li><input type=" ...
随机推荐
- Spring 详解(三)------- SpringMVC拦截器使用
目录 不拦截静态资源 使用拦截器 拦截器使用测试 SimpleMappingExceptionResolver 拦截异常 不拦截静态资源 如果配置拦截类似于*.do格式的拦截规则,则对静态资源的访问是 ...
- mysql 密碼忘記 解決
WINDOW 1.my.ini 加入 [mysqld] skip-grant-tables 2.mysql -uroot -p 登入 USE MYSQL: update user set passwo ...
- Limitations of Forms Personalization (文档 ID 420518.1)
In this Document Purpose Scope Details Diagnostics & Utilities Community: References A ...
- Go -- RPC 之 Thrift
Thrift 简介: Thrift 是一款高性能.开源的 RPC 框架,产自 Facebook 后贡献给了 Apache,Thrift 囊括了整个 RPC 的上下游体系,自带序列化编译工具,因为 Th ...
- zoj How Many Shortest Path
How Many Shortest Path 题目: 给出一张图,求解最短路有几条.处理特别BT.还有就是要特别处理map[i][i] = 0,数据有不等于0的情况! 竟然脑残到了些错floyd! ! ...
- Ubuntu16.04安装openjdk-7-jdk
ubuntu14.04 升级16.04后会默认将jdk1.7删除,因此需要重新安装. Ubuntu16.04 安装Oracle JDK 和 Open jdk 默认JDK 安装比较轻松,但根据项目调整 ...
- centos Linux 常用命令汇总
CentOS 关闭防火墙 1) 永久性生效,重启后不会复原 开启: chkconfig iptables on 关闭: chkconfig iptables off 2) 即时生效,重启后复原 开启: ...
- js中cookie的使用具体分析
JavaScript中的还有一个机制:cookie,则能够达到真正全局变量的要求. cookie是浏览器 提供的一种机制,它将document 对象的cookie属性提供 ...
- SpringBoot学习之文件结构和配置文件
Springboot文件结构和配置文件 转载:http://www.zslin.com/web/article/detail/11 项目文件结构 新建的Springboot项目的文件结构如下: |-c ...
- C#文件的压缩和解压(ZIP)使用DotNetZip封装类操作zip文件(创建/读取/更新)实例
需要引用Ionic.Zip命名空间 DLL下载地址在这里:http://dotnetzip.codeplex.com/ 文件压缩 /// <summary> /// 压缩ZIP文件 /// ...