日期:2014-05-16 浏览次数:20693 次
<form action="" method="post" id="frmUserOperation" name="frmUserOperation"> <div id="process"></div> <input type="hidden" id="method" name="method" value="1111" /> </form>
<script language="javascript" type="text/javascript"> $("#frmUserOperation").submit(function () { jQuery.ajax({ url: "/Manage/UserOperation", type: "POST", beforeSend: function () { $("#process").html("正在处理..."); }, success: function (data) { $("#process").html(data); } }); return false; }); </script>
$("#frmUserOperation").submit();
$("#frmUserOperation").submit(function () { jQuery.ajax({ url: "/Manage/UserOperation", type: "POST", data:$(this).serialize(),//////////// beforeSend: function () { $("#process").html("正在处理..."); }, success: function (data) { $("#process").html(data); } }); return false; });
------解决方案--------------------
ajax里面 data属性没设置,没有值的传递 楼上正解