liruilong

解决办法是button按钮添加一个type属性。并且设置为button,

原因是,浏览器默认的处理行为认为是作为表单提交的按钮处理,所以会提交。

这里显示定义一下就OK

<button type="button" id="history_button" onclick="questionsHistory()" style="width:25px;">历史记录</button >

 

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2021-12-19
  • 2021-12-19
  • 2021-12-19
  • 2021-12-19
  • 2021-12-19
  • 2021-12-19
  • 2021-12-19
猜你喜欢
  • 2021-12-19
  • 2021-12-19
  • 2021-12-19
  • 2021-12-19
  • 2021-12-19
  • 2021-12-19
  • 2021-08-19
相关资源
相似解决方案