这里可以用js进行判断, 并加载不同的资源文件,这样就兼容了ie
if (b.canPlayType('audio/ogg; codecs="vorbis"')) {
}else{
ie下加载不同的资源文件
}
var b = document.getElementById("); if (b.canPlayType('audio/ogg; codecs="vorbis"')) { alert(1); b.type= audio/mpeg; b.src= /static/images/alert2.ogg; var p = b.play(); p && p.then(function () { }).catch(function (e) { }); }