JS中from 表单序列化提交的代码
作者:java__killer 时间:2023-09-09 22:54:01
废话不多说了,直接给大家贴代码了,具体代码如下所示:
// ----ajax begin
$.ajax({
type: "POST",
url: "../compRule/updateRuleById?tids="+compTableName_val+"&isReportName="+$('#isReport_update').val()+"&heji_add="+$('#heji_update').val(),
async:false,
data:$("#update_form1").serialize(),
dataType: "text",
success: function(data){
$("#search").click();
$.success("操作成功");
setTimeout(function(){
layer.closeAll();
},1000);
},
error : function(data){
$.fail('操作失败!');
}
});
//----ajax end
用ajax提交到后台,要是用序列化接收不到相应的值,或值是Null,就把值拼到url上
以上所述是小编给大家介绍的JS中from 表单序列化提交的代码,希望对大家有所帮助
来源:http://blog.csdn.net/ysxybyb/article/details/54628910
标签:form,表单,序列化,提交
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
CSS执行顺序与优先权的问题
2010-08-23 16:21:00
mysql group by having 实例代码
2024-01-17 09:34:48
Python实现实时显示进度条的六种方法
2022-03-27 02:09:35
![](https://img.aspxhome.com/file/2023/2/70112_0s.jpg)
Appium+Python自动化测试之运行App程序示例
2023-07-29 01:54:20
![](https://img.aspxhome.com/file/2023/6/60986_0s.jpg)
前端token中4个存储位置的优缺点说明
2023-07-02 16:39:50
sqlserver获取当前日期的最大时间值
2024-01-16 06:54:24
sqlserver中去除字符串中连续的分隔符的sql语句
2012-06-06 20:07:39
详解Python在使用JSON时需要注意的编码问题
2022-08-03 22:06:36
![](https://img.aspxhome.com/file/2023/0/97030_0s.jpg)
Python机器学习NLP自然语言处理基本操作之Seq2seq的用法
2023-04-03 03:08:54
![](https://img.aspxhome.com/file/2023/9/105639_0s.gif)
Python函数的默认参数设计示例详解
2021-03-23 04:31:58
Django自定义模板过滤器和标签的实现方法
2023-08-12 12:24:51
![](https://img.aspxhome.com/file/2023/0/71370_0s.jpg)
下拉列表两级连动的新方法(一)
2009-06-04 18:18:00
C#连接SQL Server数据库的实例讲解
2024-01-28 04:14:01
![](https://img.aspxhome.com/file/2023/9/104319_0s.png)
Python爬虫 bilibili视频弹幕提取过程详解
2023-07-05 06:41:25
![](https://img.aspxhome.com/file/2023/7/101567_0s.png)
Pandas常用的数据结构和常用的数据分析技术
2021-02-10 05:22:35
Python学习笔记之列表推导式实例分析
2021-04-30 15:00:38
Python实现双向链表基本操作
2022-07-22 10:14:12
![](https://img.aspxhome.com/file/2023/4/99214_0s.jpg)
bootstrap table 服务器端分页例子分享
2024-04-29 13:12:15
SQL Server中避免触发镜像SUSPEND的N种方法
2024-01-29 07:01:03
![](https://img.aspxhome.com/file/2023/1/86881_0s.jpg)
使用Python做定时任务及时了解互联网动态
2021-07-08 17:54:16
![](https://img.aspxhome.com/file/2023/6/104966_0s.png)