=寂寞_狐狸= 发表于 2013-1-29 08:51:47

js 页面简易音乐播放器

<!doctype html>

<head>
  <meta charset="utf-8" />
  <title>HTML5 Document</title>
  <script>
function playClicked(element)
{
//get the state of the player
if(audio_player.paused)
{
audio_player.play();
newdisplay = "| |";
}else{
audio_player.pause();
newdisplay = ">";
}
element.value=newdisplay;
}
</script>
</head>
<body>
<audio controls="controls" id="audio_player">
 <source src="alert.wav" >
</audio>
<input type="button"value=">">
</body>
</html>
 
 
chrome 能用!!!亲测!
 
还有一个,也是能用的,取自w3协议社区
<embed type="audio/mpeg" src="Kalimba.mp3" style="width:400px; height:100px; border:3px solid black;" />
页: [1]
查看完整版本: js 页面简易音乐播放器