没有点击事件的button标签点击刷新页面

没有点击事件的button标签点击刷新页面:

理由:button在form表单中,并且button标签未定义type类型,此时type默认为submit;

解决方法: 在button标签上添加     type="button" 或者将button移除form表单之外

猜你喜欢

转载自www.cnblogs.com/chenlongsheng/p/10120223.html