button 自动刷新当前页面

button请始终为按钮规定 type 属性。Internet Explorer 的默认类型是 "button",而其他浏览器中(包括 W3C 规范)的默认值是 "submit"。

取消自动刷新方式如下:

<form action="login.html" method="post" id="loginForm" onsubmit="return false">

<button type="button" class="btn btn-warning btn-loginsize" onClick="submitForm()">

posted @ 2016-12-21 15:32  诺-诺  阅读(1675)  评论(0编辑  收藏  举报