标签:ext oca com back png pos ram product cat
解决办法;把button的type改为button即可
1 <button type="button" id="addBtn" class="btn btn-primary btn-lg">添加</button> 2 3 <script type="text/javascript"> 4 $("#addBtn").click(function () { 5 var param=$("#addProductForm").serialize(); 6 $.post({ 7 url: "AddServlet", 8 data: param, 9 success:function (aa) { 10 if(aa.flag) { 11 //添加成功,跳转到success.html 12 // alert("成功!") 13 location.href="success.html"; 14 } 15 }, 16 error:function () { 17 alert("错误!"); 18 } 19 }); 20 }); 21 </script>
标签:ext oca com back png pos ram product cat
原文地址:https://www.cnblogs.com/leonHQ/p/9797167.html