how to java code by onclick event in html code example
Example: javascript button onclick
document.getElementById('button').onclick = function() {
alert("button was clicked");
};
document.getElementById('button').onclick = function() {
alert("button was clicked");
};