调用`event.preventDefault`时我做错了什么?

问题描述

函数基本上通过单击链接从表中删除用户(行)

我想通过 href = "#"

阻止此链接认操作
linha.find('.botao-remover').on('click',removerUsuariodoPlacar(event))

function removerUsuariodoPlacar (event) {
  event.preventDefault()
  $(this).parent().parent().remove()
}
Uncaught TypeError: Cannot read property 'preventDefault' of undefined
    at removerUsuariodoPlacar (placar.js:29)
    at insereResultadonoplacar (placar.js:7)
    at finalizaJogo (main.js:56)
    at main.js:46

解决方法

linha.find('.botao-remover').on('click',() => {
    removerUsuarioDoPlacar(event)
});

试试这个