1
在cheerio中创建新元素的最佳方式是什么?在cheerio中创建新元素
可能是:
cheerio.load('<li>something in here!</li>')
或
$('li', '<li>bla, bla, bla, ...</li>')
在cheerio中创建新元素的最佳方式是什么?在cheerio中创建新元素
可能是:
cheerio.load('<li>something in here!</li>')
或
$('li', '<li>bla, bla, bla, ...</li>')
无论load
也不是上下文字符串实际创建HTML。它们是创建虚拟DOM的起点。
Refer to the Manipulation section in the documentation用于注入DOM的方法。即,提供了用于注射以下方法:
append
appendTo
prepend
prependTo
after
insertAfter
before
insertBefore
replaceWith
html
wrap