当前位置: 首页 > news >正文

提取单选框的值,并通过ajax传值到后台

<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head><th:block th:include="include :: header('日库存更新提示')" />
</head>
<style>.danxuankuang{margin-left: 20px;}
</style>
<body class="gray-bg">
<div class="container-div"><div class="danxuankuang"><input style="margin-top: 0.8em;" type="radio" id="option1" name="group1"  value="allOilTank"><label for="option1">a</label></div><div class="danxuankuang"><input style="margin-top: 0.8em;" class="tubiao" type="radio" id="option2" name="group1" value="oneOilTank"><label for="option2">b</label></div><div class="danxuankuang"><input style="margin-top: 0.8em;" class="tubiao" type="radio" id="option3" name="group1" value="twoOilTank"><label for="option3">c</label></div><div class="danxuankuang"><input style="margin-top: 0.8em;" class="tubiao" type="radio" id="option4" name="group1" value="threeOilTank"><label for="option3">d</label></div></div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">function submitHandler() {update()}function update() {//单选框的值var val=$('input:radio[name="group1"]:checked').val();// console.log(val)$.ajax({cache : true,type : "POST",url : ctx+'/ab/timePointInventory/'+val,data : val,async : false,error : function(request) {// console.log(request)$.modal.alertError("系统错误");},success : function(data) {// console.log(data)$.operate.successCallback(data);}});}
</script>
</body>
</html>
http://www.lryc.cn/news/330185.html

相关文章:

  • Django创建多app应用
  • 如何反反爬虫
  • wireshark抓包之DNS协议
  • 升级到 Java 21 是值得的
  • C# 多线程
  • 快速安装sudachipy日语包
  • 蓝桥杯刷题day13——乘飞机【算法赛】
  • 大模型量化技术-BitsAndBytes
  • EasyExcel 复杂表头的导出(动态表头和静态表头)
  • centos7 fatal error: curl/curl.h: No such file or directory
  • 【Linux】自定义协议+序列化+反序列化
  • 常见故障排查和优化
  • 选择华为HCIE培训机构有哪些注意事项
  • python怎么处理txt
  • SAMRTFORMS 转换PDF 发送邮件
  • 探讨在大数据体系中API的通信机制与工作原理
  • 算法打卡day23
  • 每天五分钟深度学习:神经网络和深度学习有什么样的关系?
  • 基于PSO优化的CNN-LSTM-Attention的时间序列回归预测matlab仿真
  • 物联网监控可视化是什么?部署物联网监控可视化大屏有什么作用?
  • 设计一个Rust线程安全栈结构 Stack<T>
  • Docker Desktop 在 Windows 上的安装和使用
  • 2024年最受欢迎的 19 个 VS Code 主题排行榜
  • 突破编程_C++_网络编程(OSI 七层模型(物理层与数据链路层))
  • Spring boot如何使用redis缓存
  • 红蓝色WordPress外贸建站模板
  • python爬虫----了解爬虫(十一天)
  • 碳素光线疗法与宠物健康
  • 展锐平台camera添加底层水印
  • OSX-02-Mac OS应用开发系列课程大纲和章节内容设计