页面内容
<form role="form" action="#" method="get" th:action="@{/url1/}" id="myFrom">
<button type="button" οnclick="exportlist();">button</button>
</form>
JS内容
<script type="text/javascript"> function exportlist(){ document.forms.myFrom.action="/url2"; document.forms.myFrom.submit(); } </script>