Html.Table

Syntax

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

About

返回一个表,其中包含针对提供的 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"}})