Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/73.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 如何找出要从网页导入的表的索引?_Html_Web Scraping_Google Sheets - Fatal编程技术网

Html 如何找出要从网页导入的表的索引?

Html 如何找出要从网页导入的表的索引?,html,web-scraping,google-sheets,Html,Web Scraping,Google Sheets,需要有关importhtml()函数的帮助,因为我正在尝试从包含许多表的html导入表。其语法如下: IMPORTHTML(url、查询、索引) 我不明白的是,我如何才能找出我要从HTML导入的表是什么索引?table元素不应该有这样一个属性:好的,您在这个页面上是表号8。我怀疑我是否已经浏览了整个html,并计算了在我需要的表格之前有多少个表格 基本上,我需要找出在浏览包含所需表格的html时应该关注的内容 在网页上,从google开发者控制台输入下面的表格编号 var i = 1; []

需要有关
importhtml()
函数的帮助,因为我正在尝试从包含许多表的html导入表。其语法如下:

IMPORTHTML(url、查询、索引)

我不明白的是,我如何才能找出我要从HTML导入的表是什么索引?table元素不应该有这样一个属性:好的,您在这个页面上是表号8。我怀疑我是否已经浏览了整个html,并计算了在我需要的表格之前有多少个表格


基本上,我需要找出在浏览包含所需表格的html时应该关注的内容

在网页上,从google开发者控制台输入下面的表格编号



var i = 1; [].forEach.call(document.getElementsByTagName("table"),
   function(x) { console.log(i++, x); });
var i = 1; [].forEach.call(document.getElementsByTagName("list"), 
   function(x) { console.log(i++, x); });