Jquery异步提交表单代码分享_jquery

WBOY
Release: 2016-05-16 16:07:28
Original
968 people have browsed it

功能很实用代码也很简单,就不多废话了,直接奉上:

$.ajax({ url:"mobileSurveyAction_addSurvey.action",//提交地址 data:$("#form1").serialize(),//将表单数据序列化 type:"POST", dataType:"json", success:function(result){ if (result.success == '100'){ $("#mySection").hide(); $(".footer").hide(); $("#alertMsg").show(); }else{ alert("失败!"); } } });
Copy after login

以上所述就是本文的全部内容了,希望能够对大家熟练掌握异步提交表单有所帮助。

请您花一点时间将文章分享给您的朋友或者留下评论。我们将会由衷感谢您的支持!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!