c# - 如何在 windows 8 Apps 中获取 webview 的当前 URL | C#、XMAL

标签 c# windows webview windows-store-apps

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

其实我想创建一个登录场景。这样我就可以集成我的大学网站以获取作业和测验的实时通知。

提前致谢

最佳答案

另一个想法是使用 InvokeScript 并使用 javascript 从文档中获取信息。像这样的东西:

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

希望对大家有帮助。

关于c# - 如何在 windows 8 Apps 中获取 webview 的当前 URL | C#、XMAL,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18696758/

相关文章:

c# - 如何将 XML 反序列化为 json 和将 json 反序列化为 c# 类?

windows - Windows 服务中带有 Autofac 的 NHibernate session 处理程序

java - 两个按钮和它们之间的 webView

android webview调用使用chrome浏览器

c# - 错误 : string[] does not contain a definition for 'Contains' - works and doesn't work

c# - 多个 Controller ,相同的 Controller 名称

c++ - 是否可以获取正在监听 Windows 端口的进程的线程 ID?

windows - 将 MASM 程序与链接导致错误加载 mspdbcore.dll(错误代码 : 193)

java - 错误的 "Webpage not available"错误

JavascriptExecutor (Selenium WebDriver C#) 不断返回空对象