What is the usage of onclick in html

hzc
Release: 2020-07-03 17:12:33
Original
27179 people have browsed it

The usage of onclick in HTML is to execute the script on the mouse click event. Onclick is an attribute of the HTML tag object. When the mouse is clicked, the javascript script set to be executed is executed.

What is the usage of onclick in html

The usage of onclick in HTML is to execute the script on mouse click event. onclick is an attribute of HTML tag object. When the mouse is clicked, the setting request is executed. Executed javascript script.

The onclick attribute is triggered by a mouse click on the element.

Note: The onclick attribute does not apply to the following elements: , ,
, , ,