on click Runs a function when an object is clicked. #javascript#event object.onclick = function(){ console.log(this); }; copy