Is there any difference or benefit between putting the JavaScript call in the href attribute (like this: Note: As of v0.14, returning false from an event handler will no longer stop event propagation. The onchange event is not triggered when turning a radio button on and off but only one or the other. OnKeyDown, OnKeyUp, OnClick, and OnChange JavaScript Events. document.body.addEventListener('touchstart', function(e){ var touchlist = e.touches for (var i=0; i Attribute Value: This attribute contains single value script which works when mouse clicked on the element. Within the function, this will be the object that onclick was bound too (which will also match event.currentTarget) Only one onclick handler can be assigned to an object at a time. The touchstart event is fired when one or more touch points are placed on the touch surface. 05/02/2017; 2 minutes to read; In this article. 10/20/2020; 7 minutes to read; g; R; n; In this article. JavaScript function in href vs. onclick . onclick can be added as an HTML attribute, whereas an addEventListener can only be added within