How to check whether audio file exists or not in html5
<pre><code>&lt;audio controls&gt;

  &lt;source src="test.mp3" type="audio/mpeg"&gt;

&lt;/audio&gt;
</code></pre>

<p>I want to display audio tag only if audio file exists . Please help me to resolve this issue </p>