onclick is a mouse click event, which occurs when the mouse is clicked on the web page. At the same time, the program block called by the onclick event will be executed, usually used with buttons.
Let’s see an example
php.cn
You can try adding onclick events to other tags