js 怎么按钮点击事件 submit 不提交

2025-06-28 12:35:46
推荐回答(1个)
回答1:

使用阻止事件默认行为的函数
e.preventDefault()
event.returnValue = false;
如需要兼容多种浏览器需要把上面写成兼容