同事的实现:
function exportLoanData() { loanbillForm.action = "${pageContext.request.contextPath}/loanbill/export"; loanbillForm.submit(); loanbillForm.action = "${pageContext.request.contextPath}/loanbill/search"; }
感觉:狸猫换太子,6!
我的实现:
<script type="text/javascript"> function userLoginMessageExport(obj){ var formData = $("#pagerForm[name='transRateCountForm']").serialize(); var href="${pageContext.request.contextPath}/userlogin/export?"+formData; $(obj).attr("href" , href); return true; } </script>
通过点击事件将a链接的参数条件放进去。