每日踩坑 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

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章