music.html 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <html>
  2. <head>
  3. <meta name="viewport" content="width=device-width">
  4. <script src="/WeiXinAPP/lib/jquery-1.7.2.min.js" type="text/javascript"></script>
  5. <script type="text/javascript">
  6. function GetQueryString(name) {
  7. var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
  8. var r = location.search.substr(1).match(reg);
  9. if (r != null) return unescape(decodeURI(r[2])); return null;
  10. }
  11. </script>
  12. </head>
  13. <body style="margin: 0px;">
  14. <audio style="margin-left: 30%; width: 360px;height: 48px;" controls="" autoplay="" name="media">
  15. <source src="" type="audio/mp3">
  16. <div id="myAudioDiv" style=" float: left; width: 360px;height: 48px;">
  17. </div>
  18. </audio>
  19. <script type="text/javascript">
  20. $(document).ready(function () {
  21. var audio = GetQueryString("audio");
  22. if (audio)
  23. {
  24. $("source").attr({
  25. src: audio
  26. });
  27. $("#myAudioDiv").html('<object style=" float: left; width: 350px;height: 45px;" classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95"><param name="AutoStart" value="1" /><param id="myaudio" name="Src" value="'+audio+'" /></object>');
  28. }
  29. });
  30. </script>
  31. </body>
  32. </html>