Click on a <p> element to alert a text:
The click event occurs when an element is clicked.
The click() method triggers the click event, or attaches a function to run when a click event occurs.
Trigger the click event for the selected elements:
Attach a function to the click event:
|function||Optional. Specifies the function to run when the click event occurs|
Your message has been sent to W3Schools.