2
我使用cheerio.js
按如下:如何獲取cheerio.js中的節點行號?
var $ = cheerio.load(html,{withStartIndices : true});
當我使用console.log($('#element1'));
。它將返回字符位置的節點。
{
type: 'tag',
name: 'h6',
attribs: { align: 'center', id: 'r' },
children: [ [Object] ],
next: null,
startIndex: 310,
.......
有沒有什麼辦法可以得到cheerio.js
中某一特定元素的行號?