2015-01-04 70 views
0

我没有与Visual Studio 13经历了,但是我设法编译一个简单的HTML5网站,使其显示的应用程序。Visual Studio 13,将HTML5网页重定向到外部网站?

我运行一个网站,我基本上喜欢集成到Windows 8.1 UI应用程序。我试过这样的代码:

<!DOCTYPE HTML> 
<html lang="en-US"> 
    <head> 
     <meta charset="UTF-8"> 
     <meta http-equiv="refresh" content="1;url=http://mywebsite.com"> 
     <script type="text/javascript"> 
      window.location.href = "http://mywebsite.com" 
     </script> 
     <title>Page Redirection</title> 
    </head> 
    <body> 
     <!-- Note: don't tell people to `click` the link, just tell them that it is a link. --> 
     If you are not redirected automatically, follow the <a href='http://mywebsite.com'>link to example</a> 
    </body> 
</html> 

但是它给了我一个APPHOST9624错误。即使我点击HREF链接失败。

很显然,我要对此错误的方式,所以我的问题是。如何创建只显示外部网站全屏的Windows 8.1商店应用程序?

回答

0

编辑:您实际上希望将网站集成到您的商店应用程序中,因此该解决方案对您无效,只是注意到:)尽管所有示例均位于XAML中,但似乎也有WebView Control,因此它可能不会在HTML5应用的支持...

我会建议您启动与新的URI的默认浏览器,尽管这将打开一个新的浏览器实例,不知道这是你在你的情况下,想要的东西。为此,尝试调用

Windows.System.Launcher.launchUriAsync(uri).done(/* Your success and error handlers */); 

Source

相关问题