C# 在windows phone 8.1的网络视图中查找文本/字符串
我在WebView中打开了一个本地html文件,这里我需要从WebView中搜索文本。Android有C# 在windows phone 8.1的网络视图中查找文本/字符串,c#,xaml,webview,windows-phone-8.1,C#,Xaml,Webview,Windows Phone 8.1,我在WebView中打开了一个本地html文件,这里我需要从WebView中搜索文本。Android有webview.findAll(字符串)&webview.findalsync(字符串)实现此目的的方法 在windows phone 8.1中是否有任何方法或替代方法可以做到这一点 string html = await myWebView.InvokeScriptAsync("eval", new string[] { "document.documentElement.outerHTML;
webview.findAll(字符串)代码>&webview.findalsync(字符串)代码>实现此目的的方法
在windows phone 8.1中是否有任何方法或替代方法可以做到这一点
string html = await myWebView.InvokeScriptAsync("eval", new string[] { "document.documentElement.outerHTML;" });
if(html.Contains("Your text")){
//text available in the web page
}
或者,如果您想获取位置,可以使用html.indexOf(“Text”)
方法。此方法是否仅适用于Windows phone 8.1。。。?或者它只适用于wp8.1 Silverlight??