我需要在按钮单击时播放几个 wav 文件。我找到了在 IE 中工作的解决方案,但它需要 Firefox 的 QickTime 插件。
还有其他方法吗?
<html>
<head>
<script>
function DHTMLSound(surl) {
document.getElementById("dummyspan").innerHTML=
"<embed src='"+surl+"' hidden=true autostart=true loop=false>";
}
</script>
</head>
<body>
<h1>test</h1>
<span id=dummyspan></span>
<input type="button" value="Play" onmouseover="DHTMLSound('1.wav')">
</body>
</html>