方法1:给form表单加onsubmit事件,值为return false;
<form action="" method="post" onsubmit="return false">
<button type="submit" class="btn btn-primary">提交</button>
</form>
方法2:在FORM表单后添加一个iframe
<form action='' method='post' name='iframeForm' target="iframeForm">
<button type="submit" class="btn btn-primary">提交</button>
</form>
<iframe id="iframeForm" name="iframeForm" style="display:none;"></iframe>