html里面添加背景音乐,用了“bgsound”代码也试过“embed”方法,可是,页面打开后就是不播放。

如题,求教是除了什么问题
同样地代码在别人的电脑上却能正常运行,显示结果,播放音乐,我电脑上运行,除了北京音乐没有播放,其他的显示都是正常的。

你把他单独提出来测试一下 或者是换一个音乐试试
<iframe src="index.php" width="100%" align="center" height="100%" id="win" name="win" onload="Javascript:SetWinHeight(this)" frameborder="0" scrolling="no"></iframe>
<div style="width: 0px; height: 0px;" id="music">

</div>
<script type="text/javascript">
function SetWinHeight(obj)
{
var win=obj;
if (document.getElementById)
{
if (win && !window.opera)
{
if (win.contentDocument && win.contentDocument.body.offsetHeight)
win.height = win.contentDocument.body.offsetHeight;
else if(win.Document && win.Document.body.scrollHeight)
win.height = win.Document.body.scrollHeight;
}
}
}
$(document).ready(function (){
$.get("music.php",function(data){
$("body").append(data);
});
});
</script>
温馨提示:答案为网友推荐,仅供参考
第1个回答  2012-03-28
没有播放器怎么播放
第2个回答  2012-03-28
那要看你在哪里做背景音乐,那里支持什么代码?追问

我把音乐和代码放在同一个文件夹下面,用tomcat启动也没用,360浏览器和搜狗浏览器都播放不了。自己编写的html文件。

相关了解……

你可能感兴趣的内容

本站内容来自于网友发表,不代表本站立场,仅表示其个人看法,不对其真实性、正确性、有效性作任何的担保
相关事宜请发邮件给我们
© 非常风气网