366   HTML JS

1,通过纯HTML5

 

<audio controls="controls" height="100" width="100"> 
  <!-- Internet Explorer、Chrome 以及 Safari  -->
  <source src="song.mp3" type="audio/mp3" />
  <!--  Firefox 和 Opera -->
  <source src="song.ogg" type="audio/ogg" />
  <!-- 利用插件 --> 
  <embed height="100" width="100" src="song.mp3" />
</audio>

 

 

 

2,借助JS播放器

<a href="song.mp3">Play Sound</a>
<!-- js播放器 -->
<script type="text/javascript" src="http://mediaplayer.yahoo.com/js">
</script>

 




Leave a Reply

Your email address will not be published. Required fields are marked *