解决方法
只需将按钮绑定到表单元素的submit方法,并且重定向将自然发生.
<script type='text/javascript'> function form_send(){ f=document.getElementById('the_form'); if(f){ f.submit(); } } </script> <form method='post' action='your_post_url.html' id='the_form'> <input type='hidden' value='whatever'> </form> <span id='subm' onclick='form_send()'>Submit</span>