For AI agents: the complete documentation index is available at /next/zh/llms.txt, the full documentation bundle is available at /next/zh/llms-full.txt, and this page is available as Markdown at /next/zh/api/lynx-api/global/console/table.md.
Lynx
  • 简体中文
  • console: table() method

    table 方法用于将表格数据显示为表格。

    语法

    table(data: any, columns: array?): undefined;

    参数

    data

    要显示的数据。这必须是数组或对象。数组中的每个项目或对象中的属性都由表中的一行表示。表中的第一列标记为(索引),其值是数组索引或属性名称。

    columns

    可用于限制表中显示的列的数组。它包含索引,如果数据的每个条目是数组或属性名称,则每个数据的每个条目都是对象。然后,结果表仅包含匹配给定索引或名称的项目的列。

    返回值

    无(undefined)。

    兼容性

    LCD tables only load in the browser

    除非另有说明,本项目采用知识共享署名 4.0 国际许可协议进行许可,代码示例采用 Apache License 2.0 许可协议进行许可。