Home  >  Article  >  Web Front-end  >  What is the usage of onclick in html

What is the usage of onclick in html

hzc
hzcOriginal
2020-07-03 17:12:3327153browse

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: , ,
, , ,