hit a script on click of button in html code example Example: button on click script <button onclick="myFunction()">Click me</button>