如何在 Edge 或 Chrome 等浏览器中从 Javascript Windows 通用应用程序应用程序打开 URL?
使用“open”JS 函数 (window.open) 打开应用程序窗口内的 url。我想在 Edge 或默认的 Windows 10 配置浏览器上打开它。
最佳答案
您可以使用LaunchUriAsync方法。
Windows.System.Launcher.launchUriAsync( // note that .launchUriAsync() is lowercase
new Windows.Foundation.Uri("http://stackoverflow.com/"))
.then(function (success) {
if (success) {
// the launch succeeded
} else {
// the launch failed
}
});
关于javascript - 如何在浏览器窗口中从 Javascript Windows 通用应用程序打开 URL?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37366536/