Another event that can be used to trigger actions is the
In this example we can see that an alert message appears as soon as the mouse button is pushed down.
The code block for this action is almost identical to the others we have looked at so far. The only difference is that we have updated the event to
We can also change it to
mouseup, if we want the action triggered as soon as we let go of the mouse button after clicking.
alert("Your Mouse Entered Paragraph 1");
<p id="p1">This is Paragraph 1.</p>