〈META http-equiv=Content-Type content=“text/html; charset=gb2312“〉
〈/HEAD〉
〈BODY〉
〈SCRIPT〉
function sound()
{
document.write(“〈bgsound src=’mail.wav’〉“);
}
〈/SCRIPT〉
〈a href=“#“ onmouseover=“javascript:sound()“〉声音〈/a〉
〈/BODY〉
〈/HTML〉
另外的代码:
〈OBJECT ID=’AlvinWmaPlayer’ CLASSID=’CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6’ type=’application/x-oleobject’ width=’0’ height=’0’ style=’position:relative;left:0px; top:0px;width:0px;height:0px;’〉
〈param name=’URL’ value=’firework.wav’〉
〈param name=’uiMode’ value=’invisible’〉
〈/OBJECT〉
〈a onmouseover=“AlvinWmaPlayer.controls.stop();AlvinWmaPlayer.controls.play();“〉声音〈/a〉
本文介绍了两种在网页中内嵌音乐播放的方法:一种是通过JavaScript触发背景音乐播放;另一种是利用HTML Object标签实现媒体文件播放,并可通过链接触发播放或停止。
32

被折叠的 条评论
为什么被折叠?



