时间:2021-07-01 10:21:17 帮助过:4人阅读
<script type="text/javascript">
function saveUrlAndGo(url, form) {
document.cookie = "returnUrl=" + escape(location.pathname + location.search);
if (form) {
form.action = url;
form.submit();
} else {
location.href = url;
}
}
</script>
因此只要在action中配置好returnUrl,就可以很方便地解决这个问题,而不必写两个action了。