两次 ajax 请求
简介:本人想实现一个点击下拉框将选中的数据提交到后台查询,查询结果返回前台页面在下拉框中显示,再次选择下拉框将数据提交到后台,查询数据并将数据在前台页面显示
<#include "/common/commoncss.ftl">
<div class="bgc-w box"> <form action="apply" enctype="multipart/form-data" method="post" onsubmit="return check();" > <div class="box-header"> <table class="bo table "> <tr > <td colspan="14" class="title"><h2>生产领料单</h2></td> </tr> <tr style="opacity: 0;"> <td colspan="14">11</td> </tr> <tr > <td colspan="14" style="text-align: left;"> <!--錯誤信息提示 --> <div class="alert alert-danger alert-dismissable" style="display:none;" role="alert"> 错误信息:<button class="thisclose close" type="button">×</button> <span class="error-mess"></span> </div> </td> </tr> <tr > <td class="title"><label class="control-label">生产单号</label></td> <td colspan="6"><input type="text" class="form-control inpu" name="productionOrder"/></td> <td class="title"><span >创建时间</span></td> <td colspan="6"><input type="text" class="form-control inpu" name="orderDate"></td> </tr> <tr > <td class="title" ><label class="control-label">领料人</label></td> <td colspan="6"><input type="text" class="form-control inpu" name="pickMan"/></td> <td class="title" ><label class="control-label">领料部门</label></td> <td colspan="6"><input type="text" class="form-control inpu " name="pickDept"/></td> </tr> <tr > <td class="title" ><label class="control-label">生产负责人</label></td> <td colspan="6"><input type="text" class="form-control inpu" name="signOff"/></td> <td class="title" ><label class="control-label">用途</label></td> <td colspan="6"><input type="text" class="form-control inpu" name="purpose"></td> </tr> <tr > <td class="title" ><label class="control-label">备注</label></td> <td colspan="6"><input type="text" class="form-control inpu" name="remark"></td> <td class="title" ><label class="control-label">生产领料单票据</label></td> <td colspan="6"> <div class="btn btn-default"style="position: relative; overflow: hidden;width: 100%;margin-top: -6px;"> <i class="glyphicon glyphicon-open"></i> 上传票据 <input type="file" name="filePath" style="opacity: 0; position: absolute; top: 12px; right: 0; " class='inpu'> </div> </td> </tr> <tr > <td class="title"><label class="control-label">领料明细</label></td> <td colspan="13" style="text-align: right;" ><i class="glyphicon glyphicon-plus zeng"></i> <i class="glyphicon glyphicon-minus jian"></i></td> </tr> <tr > <td colspan="14" > <#-- <div class="food">--> <table class="table inside"> <thead> <tr> <th colspan="2" style="width: 77px;">选择</th> <th colspan="2">原材料名称</th> <th colspan="2">规格型号</th> <th colspan="2">计量单位</th> <th colspan="2">商品类型</th>
<#-- 仓库数量-->
领取数量
<#-- -->
<td colspan="14" style="text-align: right;" > <input class="btn btn-primary" id="save" type="submit" value="保存" /> <input class="btn btn-default" id="cancel" type="button" value="取消" onclick="window.history.back();" /> </td> </tr> </table> </div> </form> </div> </div>
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· AI与.NET技术实操系列:基于图像分类模型对图像进行分类
· go语言实现终端里的倒计时
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 分享一个免费、快速、无限量使用的满血 DeepSeek R1 模型,支持深度思考和联网搜索!
· 基于 Docker 搭建 FRP 内网穿透开源项目(很简单哒)
· ollama系列01:轻松3步本地部署deepseek,普通电脑可用
· 25岁的心里话
· 按钮权限的设计及实现