0
我已經在使用swfobject的Youtube視頻的加載器。 使用的插件:jQuery 1.6.4 + SWFobject 2.2IE8的錯誤:腳本innerhtml加載
一切都很好的工作在IE8上!它崩潰的script.innerHTML ...
<div id"youtube"><div id="player"></div></div>
SCRIPT
function loadYoutube(videoID)
{
var script = document.createElement("script");
script.type = "text/javascript";
document.getElementById("youtube").appendChild(script);
script.innerHTML = 'var params = { allowScriptAccess: "always", wmode: "transparent", allowfullscreen:"true" }; var atts = { id: "player" }; swfobject.embedSWF("http://www.youtube.com/v/'+videoID+'?enablejsapi=1&playerapiid=ytplayer&version=3", "player", "870", "550", "8", "flash/expressInstall.swf", null, params, atts);';
}
loadYoutube('BoEKWtgJQAU');
任何想法? 謝謝