onclick Attribute Syntax
The onclick attribute is located inside the HTML element tag. The value of the onclick can be set inside the double-quote or without any quote.
- ELEMENT is the HTML element name which can be a text, button or label, etc.
- TEXT is the ELEMENT text or data.
<button onclick="alert(Hello Wisetut)">Wisetut</button>
update() when the button is clicked.