Player.controls.play() 播放提示音的问题
<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