[英]SWF doesn't render in IE9 (but does in Chrome/FF)
以下代碼不會在IE9中從IIS7托管的遠程網頁中呈現swf,但在Chrome和FF中會顯示。
我想念什么?
檔案: http : //srv.ab.com/page/swftestpage.htm
<script type="text/javascript">
(function () {
var object = document.createElement('object');
object.setAttribute('width', '300');
object.setAttribute('height', '250');
object.setAttribute('classid', 'clsid:d27cdb6e-ae6d-11cf-96b8-444553540000');
var param1 = document.createElement('param');
param1.setAttribute('name', 'movie');
param1.setAttribute('value', 'http://srv.ab.com/test.swf');
var embed = document.createElement('embed');
embed.setAttribute('src', 'http://srv.ab.com/test.swf');
embed.setAttribute('width', '300');
embed.setAttribute('height', '250');
var param2 = document.createElement('param');
param2.setAttribute('name', 'wmode');
param2.setAttribute('value', 'transparent');
object.appendChild(param1);
object.appendChild(embed);
object.appendChild(param2);
var container = document.getElementById('myDivID');
while (container.firstChild) { container.removeChild(container.firstChild); }
container.appendChild(object);
})();
</script>
<object>
標記上的正確屬性是classid
。 你有clsid
參考-http: //www.alistapart.com/articles/flashembedcagematch/
我會認真使用SWFObject的動態發布,而不是在這里重新發明輪子
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.