Html.Table

语法

Html.Table(html as any, columnNameSelectorPairs as list, optional options as nullable record) as table

关于

返回一个表,其中包含针对所提供的 html 运行指定 CSS 选择器的结果。 可以提供可选记录参数 options 来指定额外的属性。 记录可以包含以下字段:

  • RowSelector

示例 1

从示例 html 文本值返回一个表。

使用情况

Html.Table("<div class=""name"">Jo</div><span>Manager</span>", { { "Name", ".name" }, { "Title", "span" } }, [RowSelector=".name"])\

输出

#table({ "Name", "Title" }, { { "Jo", "Manager" } })

示例 2

从示例 html 文本值中提取所有 href。

使用情况

Html.Table("<a href=""/test.html"">Test</a>", { { "Link", "a", each [Attributes][href] } })

输出

#table({ "Link" }, { { "/test.html" } })

results matching ""

    No results matching ""