Winjs 在Windows应用商店应用程序中执行命令

Winjs 在Windows应用商店应用程序中执行命令,winjs,Winjs,我正在开发一个具有一些URL-s的Windows应用商店应用程序。我只想达到的是,如果我点击其中一个,我的应用程序将切换到Internet Explorer 有没有办法做到这一点 桑多尔 // 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);

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

有没有办法做到这一点

桑多尔

// 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
       }
   });
这样行吗