【发布时间】:2017-01-23 15:34:56
【问题描述】:
如何在 chrome 上使用 javascript 加载游戏?
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>
或闪存:
<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”?
标签: javascript jquery google-chrome iframe embed