先来一个from表单
<form class="form-horizontal" method="post" target="posthere" action="user-login" onsubmit="return checkRegForm();" >
在页面添加一个iframe标签
<iframe name="posthere" frameborder=0 width=0 height=0></iframe>
这样form表单提交后将跳转到iframe去,不过因为这个iframe设置成看不可见,所以看不到,当然如果需要显示也可以设置一个大小来显示。