将.wav文件嵌入所有浏览器的HTML页面(无控件) [英] Embedd .wav files in HTML page in all browsers (no controls)
本文介绍了将.wav文件嵌入所有浏览器的HTML页面(无控件)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要在按钮点击几个wav文件。我发现解决方案在IE中工作,但它需要firefox的QickTime插件。
I need to play few wav files on button click. I found solution working in IE but it requires QickTime plugin for firefox.
有其他方法吗?
<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>
推荐答案
使用其中之一。我只能使用jPlayer,并且可以强烈推荐它。
Use one of these. I have only use jPlayer and can strongly recommend it.
jPlayer (需要Flash)
Scriptaculous插件(在Firefox中不使用Flash)
Scriptaculous plugin (works without Flash in Firefox)
MooTools (需要Flash)
这篇关于将.wav文件嵌入所有浏览器的HTML页面(无控件)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文