$('button').mousedown(function(event){
event.preventDefault();
});
本文介绍了一种使用jQuery阻止按钮默认行为的方法,通过在mousedown事件中调用preventDefault()函数,可以有效地避免按钮触发其预设操作。
$('button').mousedown(function(event){
event.preventDefault();
});
6472

被折叠的 条评论
为什么被折叠?