我想在IE9上使用html5shiv來獲得支持,但是我無法讓它工作。我已經安裝了這頭部分:如何使用html5shiv和iframe沙盒屬性
<!--[if IE 9]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
我需要對HTML5的Iframe沙箱支持:
<iframe id="iframe" src="http://www.telegraaf.nl" sandbox="allow-scripts allow-forms allow-same-origin"></iframe>
在iframe中網站將打破在IE9的iframe這樣就意味着沙盒不加工。我認爲問題可能是沙箱是iframe的屬性,而不是「樣式方法/元素」。
所以基本上我需要一些建議。我還可以做些什麼?有沒有一個插件(jQuery的?JavaScript?)的地方,將支持在IE瀏覽器的沙箱?
實際上IE9支持HTML5。 – undefined 2013-05-14 08:54:14
@undefined Oke,但它似乎不支持沙箱。 (並且我實際上也需要它用於IE8) – Youss 2013-05-14 08:56:37
html5shiv腳本不添加任何功能 - 它只是通過創建它們而使IE知道未知元素。這並不影響_attributes_ IE可能支持某些元素的內容;除此之外,'iframe'甚至不在shiv處理的元素列表中。 – CBroe 2013-05-14 08:58:19