gpt4 book ai didi

javascript - 查询 : Play notification sound : IE8 Error

转载 作者:行者123 更新时间:2023-11-29 17:19:58 25 4
gpt4 key购买 nike

此代码适用于 crome 和 firefox.. 但在 IE8 中出错

if($('#soundcheck').is(':checked')){
//alert('checked');
var audio = document.createElement('audio');
document.body.appendChild(audio);
audio.src = system_base_url+'/sound/horn.wav';
audio.play();

}

IE8 说:对象不支持此属性或方法,它指向:

audio.play();

有人对 IE8 有类似的体验吗?

问候

最佳答案

<audio>标记是 HTML5,仅在较新的浏览器中受支持,例如 Internet Explorer 9、Firefox、Opera、Chrome 和 Safari。

关于javascript - 查询 : Play notification sound : IE8 Error,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13600351/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com