定义和用法
preventDefault() 方法阻止元素发生默认的行为(例如,当点击提交按钮时阻止对表单的提交)。
语法
event.preventDefault()
参数 描述
event 必需。规定阻止哪个事件的默认动作。这个 event 参数来自事件绑定函数。
定义和用法
preventDefault() 方法阻止元素发生默认的行为(例如,当点击提交按钮时阻止对表单的提交)。
语法
event.preventDefault()
参数 描述
event 必需。规定阻止哪个事件的默认动作。这个 event 参数来自事件绑定函数。
转载于:https://www.cnblogs.com/LeesinDong/p/10835602.html