【问题标题】:want to add iframe in window apps想在窗口应用程序中添加 iframe
【发布时间】:2014-01-04 11:13:49
【问题描述】:

我只想在 default.html 中添加 iframe,但它无法显示白页...

这是我的代码

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title>FinderToday</title>

    <!-- WinJS references -->
    <link href="//Microsoft.WinJS.2.0/css/ui-dark.css" rel="stylesheet" />
    <script src="//Microsoft.WinJS.2.0/js/base.js"></script>
    <script src="//Microsoft.WinJS.2.0/js/ui.js"></script>

    <!-- FinderToday references -->
    <link href="/css/default.css" rel="stylesheet" />
    <script src="/js/default.js"></script>
</head>
<body> 

    <p><a href="ms-appx:///page2.html">Go to page 2</a></p>
    <p><a href="http://www.bing.com">Search the web</a></p>

    <iframe src="http://maps.bing.com" style="width:1366px; height: 768px"></iframe>
</body>
</html>

【问题讨论】:

  • 你用哪个浏览器打开这个文件“Defaul.html”??
  • 不在浏览器中,在窗口 Metro 应用程序中
  • 好的,亲爱的。关注此链接希望对您有所帮助...social.msdn.microsoft.com/Forums/windowsapps/en-US/…
  • 如果您只是尝试以相同的方式将网站托管在独立网页中,它是否有效?
  • iframe 中很可能存在脚本错误...您是否尝试过使用 webview 代替?

标签: visual-studio-2012 microsoft-metro winjs


【解决方案1】:

您的目标是什么版本的 Windows - Windows 8 或 Windows 8.1?

如果您的目标是 Windows 8.1,请使用 x-ms-webview 元素而不是 iframe。

http://msdnstage.redmond.corp.microsoft.com/en-us/library/windows/apps/dn301831.aspx http://blogs.windows.com/windows/b/appbuilder/archive/2013/10/01/blending-apps-and-sites-with-the-html-x-ms-webview.aspx

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2010-11-22
    • 2021-06-02
    • 2011-04-09
    • 2014-12-25
    • 1970-01-01
    • 1970-01-01
    • 2015-06-29
    • 2020-10-23
    相关资源
    最近更新 更多