onclick
is case sensitive. So it is onclick
. It expects a callback function to be assigned to it, which will be called.
document.getElementById("div1").onclick = divFunction;
If you are trying to add more events, then you need a event listener like what adeneo has suggested.