title: Calling same function on both mouse click and key press using html and javascript
body: <p>I want to call the same function in javascript either on mouse click or keypress(enter).This is my code in html but it is not working..how can i do it.?</p>
  
  <pre><code>&lt;div class="C" onclick="Cfunc()" onKeyDown="if(keycode==13)Cfunc();"&gt;
    &lt;p &gt;C&lt;/p&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>and this is my js code:</p>
  
  <pre><code>function Cfunc() {
    var audio = document.getElementById("Caudio")
    audio.play();
  }
  </code></pre>