c# 利用 webbrowser 解析 html
using(var wb = new WebBrowser()) { wb.ScriptErrorsSuppressed = true; wb.Navigate("about:blank"); var startTime = DateTime.Now; while (true) { Application.DoEvents(); if (wb.ReadyState == WebBrowserReadyState.Loaded || wb.ReadyState == WebBrowserReadyState.Complete || startTime.AddMilliseconds(1) < DateTime.Now) break; } wb.Document.Body.InnerHtml = "<h1>Hello</h1>"; var x = wb.Document.Body.Children[0].OuterHtml ; }
桂棹兮兰桨,击空明兮溯流光。