-1
如何在Chrome瀏覽器中使用JavaScript加載遊戲?Iframe src改變Javascript未加載Chrome瀏覽器
的Javascript:
document.getElementById('game').src = "www.example.com";
使用IFRAME:
<iframe src="/games/game.html" id="game"
style="display:block;margin:0 auto;" width="100%" height="100%"
frameborder="0" allowfullscreen="true" webkitallowfullscreen="true"
mozallowfullscreen="true" ></iframe>
或Flash:
<embed src="/games/game.swf" id="game" quality="high"
pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?
P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash"
width="100%" height="100%">
您是否嘗試將相對路徑更改爲「./games/game.html」? – mrapsogos