for example, this code:
function add() {
console.log("add")
}
document.querySelector("-sharpipt").addEventListener("click",add);
what I need now is to take parameters in the add function, that is,
function add(val) {
console.log("add"+val)
}
document.querySelector("-sharpipt").addEventListener("click",add("argument"));
it"s not right to write this. How can I pass in the function form of add with parameters?