保留字備忘 ---------- 跨行文字: @"... CRLF ... CRLF ...", 其中 CRLF 為鍵盤實際輸入跨行符號如下: using System; using System.Xml; using System.Linq; using HtmlAgilityPack; public class Program { public static void Main() { var html = @"
Name :
"; var htmlDoc = new HtmlDocument(); htmlDoc.LoadHtml(html); string name = htmlDoc.DocumentNode .SelectNodes("//td/input") .First() .Attributes["value"].Value; Console.WriteLine(name); } }