JSFiddle - React, Tailwind, and code Playground
HTML
<button id="myButton" onclick="alert('Hello world!')">Click Me</button>
JavaScript
// Get a reference to the button element
var button = document.getElementById("myButton");
// Remove the onclick attribute
button.removeAttribute("onclick");