每日踩坑 2019-08-23 button 元素点击后刷新页面

 

button标签按钮会提交表单。

 

解决方案:

<button class="btn btn-primary"  type="button" id="btnSubmit" name="btnSubmit"><i class="fa fa-save"></i>确定</button>

现在程序最好兼容各个主流浏览器,应始终为按钮规定 type 属性。

 

https://www.cnblogs.com/fengduandeai/p/8806110.html

https://zhidao.baidu.com/question/1861425098722336547.html

posted @ 2019-08-23 14:10  Aaxuan  阅读(233)  评论(0编辑  收藏  举报