title: Changing the song of the html5 audio player
body: <p>I want to use javascript to change the src like so:</p>
  
  <pre><code>&lt;script&gt;
  function myFunctionP1() {
      mysong = "http://www.afinerweb.com/music/bensound-slowmotion.1.mp3";
  }
  function myFunctionP2() {
      mysong = "http://www.afinerweb.com/music/bensound-slowmotion.2.mp3";
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>and have some buttons to control music selection like so:</p>
  
  <pre><code>&lt;button type="button" onclick="myFunctionP1()"&gt;set player to Song1&lt;/button&gt;
  &lt;button type="button" onclick="myFunctionP2()"&gt;set player to Song2&lt;/button&gt;
  </code></pre>
  
  <p>but that does not seem to work. Can someone please point out the correct solution?</p>