document.getElementById("add").onclick = nomeFunzione;
o
document.getElementById("add").onclick = function(){nomeFunzione('eventuali argomenti');}