【发布时间】:2015-06-02 18:43:56
【问题描述】:
有没有办法通过在其中插入一些我在字符串中的java脚本代码来打开系统浏览器?
【问题讨论】:
标签: javascript c# .net windows-phone-8.1 windows-8.1
有没有办法通过在其中插入一些我在字符串中的java脚本代码来打开系统浏览器?
【问题讨论】:
标签: javascript c# .net windows-phone-8.1 windows-8.1
来自MSDN
// 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);
// Launch the URI
Windows.System.Launcher.launchUriAsync(uri).then(
function (success) {
if (success) {
// URI launched
} else {
// URI launch failed
}
});
【讨论】:
不可能。当您将 WebView 嵌入到您的应用程序时,您只能导航到您的字符串。外部浏览器只能通过 Url 启动。
【讨论】: