Javatpoint Logo
Javatpoint Logo

HTML <Button onClick=" ">

The Html <button onclick=" "> is an event attribute, which executes a script when the button is clicked. This attribute is supported by all browsers. It is also used to call a function when the button is clicked.

Syntax:

Examples:

Example 1: Following example describes how to use the button tag:

Test it Now

Output:

HTML Button onClick

Browser Support

Elementchrome browser Chromeie browser IEfirefox browser Firefoxopera browser Operasafari browser Safari
<onClick>YesYesYesYesYes

Next TopicHTML Checkbox Tag




Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA