jquery获取点击单选按钮的值
2017-05-09 14:13
387 查看
html:
jquery:
<form> 是否开启定位:<label><input type="radio" name="isLocation" value="1"/>开启</label> <label><input type="radio" name="isLocation" value="0"/>关闭</label> </form>
jquery:
$(document).ready(function(){ $("input[name='isLocation']").click(function(){ var settingSafeIslandFlag =$("input[name='isLocation']:checked").val(); var deviceNo =$('#deviceNo option:selected').val(); jQuery.ajax({ type:'POST', url:getWebRootPath()+'/deviceSet/setDeviceSettingFlag.json', data:{"deviceNo":deviceNo,"settingSafeIslandFlag":settingSafeIslandFlag}, dataType:'json', success:function(data){ if(data.msg =='0'){ new BUI.Message.Alert('关闭成功','success'); }else{ new BUI.Message.Alert('开启成功','success'); } } }); }); });
相关文章推荐
- jquery获取input单选按钮点击事件及单选按钮值的方法
- jquery 获取已选中的单选按钮的值|怎么让单选按钮从数据库中返回的值被选中
- Jquery 获取单选按钮组选中的值的方法
- jQuery如何获取选中单选按钮radio的值
- jquery获取选中单选按钮radio的值,监听type=radio的click事件
- jquery单选按钮循环赋值及获取选中的值
- jquery 获取单选按钮选中的值
- jQuery获取单选按钮(Radio)当前选中项的值
- jQuery获取选中单选按钮radio的值
- 一周乱弹(jquery select保留第一项,其余清空2,SimpleDateFormat 最全参考例子3,sql in语句4,jQuery 修改按钮样式及禁用按钮5当单选框值改变时获取单选框的值)
- jquery 单选按钮获取选中的值
- jquery如何获取选中的单选按钮的值
- jQuery获取循环中的选中单选按钮radio的值
- 使用jquery获取单选按钮radio的值
- jQuery获取单选按钮radio选中值与去除所有radio选中状态
- 点击添加按钮用jquery获取文本框值,传值给另一个页面
- jquery获取选中的单选按钮的值
- jQuery实现点击单选按钮切换选中状态效果
- jQuery如何获取选中单选按钮radio的值
- Jquery获取radio单选按钮的value与后面的文字