<html>

    <head>
        <title>Audio test</title>

        <script type="text/javascript">
            // @param filename The name of the file WITHOUT ending
            function playSound(filename){   
                document.getElementById("sound").innerHTML='<audio autoplay="autoplay"><source src="' + filename + '.mp3" type="audio/mpeg" /><source src="' + filename + '.ogg" type="audio/ogg" /><embed hidden="true" autostart="true" loop="false" src="' + filename +'.mp3" /></audio>';
            }

        </script>
    </head>

    <body>

        <button onclick="playSound('bing');">Play</button>  
        <div id="sound"></div>

    </body>
</html>