折腾:
期间,需要用jquery去插入一个html元素:
x
Notice: Auto play prevented, please mannually click above play button to play
jquery insert html
结果写成带换行的话:
var audioPlayPreventedNoticeHtml = ‘
x
Notice: Auto play prevented, please mannually click above play button to play
console.log("audioPlayPreventedNoticeHtml=%o", audioPlayPreventedNoticeHtml);
会报错:
去掉换行试试
function showAudioPlayPreventedNotice(){
console.log("showAudioPlayPreventedNotice");
// var prevDisplayValue = $("#audio_play_prevented").css("display");
// console.log("prevDisplayValue=%o", prevDisplayValue);
// $("#audio_play_prevented").css({"display":"block"});
var audioPlayPreventedNoticeHtml = ‘
console.log("audioPlayPreventedNoticeHtml=%o", audioPlayPreventedNoticeHtml);
$(".audio_player").append(audioPlayPreventedNoticeHtml);
}
就可以了: