js播放wav格式的录音文件

时间:2014-08-11 15:27:14   收藏:0   阅读:415


<input type="button" onclick="playSound(‘wavFileId‘);" value="play"/>

<embed id="wavFileId"
       src="c://fileRecord/20140729/006/20140729095707000---Out-006.wav"
       width="0"
       height="0"
       loop="false"
       autostart="false">
</embed>

<script type="text/javascript">
function playSound(id)
{
  var node=document.getElementById(id);
  alert(id);
  alert(node.src);
  if(node!=null)
  {
     node.Play();
  }
}
</script>

js播放wav格式的录音文件,布布扣,bubuko.com

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!