如何在Windows 8 Apps中获取Webview的当前URL。C#,XMAL

Amm*_*hir 1 c# windows webview windows-store-apps

如何获取Webview中当前打开的页面的URL?

实际上,我想创建一个登录方案。这样我就可以整合我的大学网站,以便实时通知作业和测验。

提前致谢

Rei*_*ldo 6

另一个想法是使用InvokeScript并使用javascript从文档中获取信息。就像是:

var url = await myWebView.InvokeScriptAsync("eval", new String[] { "document.location.href;" });
Run Code Online (Sandbox Code Playgroud)

希望它可以帮助某人。