Windows 8 Metro应用程序Iframe



我一直在寻找答案,但似乎找不到我做错了什么。我正在构建一个Windows 8应用程序,它将与谷歌的API捆绑在一起,我对整个iframe概念感到困惑。我一个又一个地以身作则,似乎什么都不起作用。下面是我正在尝试处理的两个页面的片段,以及我遇到的错误。如有任何帮助,我们将不胜感激。提前感谢!

<html>
<head>
<meta charset="utf-8" />
<title>WinWebApp1</title>
<!-- WinJS references -->
<script src="//Microsoft.WinJS.1.0.RC/js/base.js"></script>
<script src="//Microsoft.WinJS.1.0.RC/js/ui.js"></script>
<!-- WinWebApp1 references -->
</head>
<body>
<div>
 <iframe id="Iframe" src="ms-app-web:///page.html"></iframe>
</div>
</body>
</html>

第2页

<!DOCTYPE html>
<html>
<head>
    <title>Test</title>
</head>
<body>
<div>This is a test</div>
</body>
</html>

我得到错误

APPHOST9624: The app can’t use script to load the ms-app-web:///page.html url because the url launches another app. Only direct user interaction can launch another app.

我遇到了同样的问题。这绝对是你想要的"ms-appx-web"。

<iframe id="Iframe" src="ms-appx-web:///page.html"></iframe>

最新更新