欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

JS網(wǎng)頁播放聲音實(shí)現(xiàn)代碼兼容各種瀏覽器

 更新時(shí)間:2013年09月22日 15:33:15   作者:  
JS網(wǎng)頁播放聲音有多種方法可以實(shí)現(xiàn),不過兼容各種瀏覽器的就沒有幾個(gè)了,不過本文的這個(gè)示例或許對(duì)大家有所幫助
復(fù)制代碼 代碼如下:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>SwfObject2.2Demo</title>
<script type="text/javascript" src="swfobject.js"></script>
<script type="text/javascript">
var flashvars = {
};
var params = {
wmode: "transparent"
};
var attributes = {};
swfobject.embedSWF("sound.swf", "sound", "1", "1", "9.0.0", "expressInstall.swf", flashvars, params, attributes);

function play(c) {
var sound = swfobject.getObjectById("sound");
if (sound) {
sound.SetVariable("f", c);
sound.GotoFrame(1);
}
}
</script>
</head>
<body>
<div id="sound">
</div>
<input type="button" value="播放" onclick="play('msg.mp3')" />
</body>
</html>

需要的引入文件,在js特效文件夾里面

相關(guān)文章

最新評(píng)論