how to check what happens when you click on html button code example
Example: how to detect a button click in javascript
if(document.getElementById('button').clicked == true)
{
alert("button was clicked");
}
if(document.getElementById('button').clicked == true)
{
alert("button was clicked");
}