Player.controls.play() 播放提示音的问题

zhuangjunx 2018-03-15 01:47:47
<script type="text/javascript">
//提示音代码
if(-1 != navigator.userAgent.indexOf("MSIE")) {
//不是微软IE浏览器,则调用Flash来播放音乐
document.write(' <OBJECT id="Player"');
document.write(' classid="clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6"');
document.write(' width=0 height=0 > <param name="URL" value="ding.wav" /> <param name="AutoStart" value="false" /> </OBJECT>');
} else {
//是微软IE浏览器,则调用微软的Player对象来直接播放音乐
document.write(' <OBJECT id="Player"');
document.write(' type="application/x-ms-wmp"');
document.write(' autostart="false" src= "ding.wav" width=0 height=0> </OBJECT>');
}
</script>

Player.controls.play(); 执行这个提示

Cannot read property 'play' of undefined
...全文
689 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
zhuangjunx 2018-03-20
  • 打赏
  • 举报
回复
没人?????
zhuangjunx 2018-03-16
  • 打赏
  • 举报
回复
要结贴了,谁回复一下。
zhuangjunx 2018-03-15
  • 打赏
  • 举报
回复
请问是什么问题。

21,886

社区成员

发帖
与我相关
我的任务
社区描述
从PHP安装配置,PHP入门,PHP基础到PHP应用
社区管理员
  • 基础编程社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧