title: Is there a way to check if a button has been clicked in HTML/Javascript?
body: <p>I was wondering if there is a way of checking if a button has been clicked? This is the button I want to check:</p>
  <pre><code>&lt;button id=&quot;money&quot; onClick=&quot;myFunction()&quot;&gt; £25 &lt;/button&gt;
  </code></pre>
  <p>I've looked all over to try and find a solution but any method I've tried just creates errors, this is one solution I've tried:</p>
  <pre><code>function myFunction{
  if(document.getElementById('money').clicked == true){
    alert(&quot;button was clicked&quot;)
  }
  }
  </code></pre>
  <p>Any help is greatly appreciated! Thanks</p>