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