0

我正在开发一个具有一些 URL-s 的 Windows 应用商店应用程序。我只是想达到的是,如果我单击其中之一,我的应用程序将切换到 Internet Explorer。

有没有办法做到这一点?

桑德尔

4

1 回答 1

2
// The URI to launch
var uriToLaunch = "http://www.bing.com";
// Create a Uri object from a URI string 
var uri = new Windows.Foundation.Uri(uriToLaunch);

Windows.System.Launcher.launchUriAsync(uri).then(
   function (success) {
       if (success) {
           // URI launched
       } else {
           // URI launch failed
       }
   });

这样做吗?

于 2012-12-10T16:12:31.077 回答