Select elements with an attribute with cheerio

后端 未结 2 1688
时光取名叫无心
时光取名叫无心 2021-02-19 09:23

What is the most efficient way to select all dom elements that have a certain attribute.


With plain javascript I wo

2条回答
  •  甜味超标
    2021-02-19 09:53

    Ok I found it in the cheerio documentation, here is how you do it:

    $('[name=mode]')
    

    cheerio docs: Selectors

提交回复
热议问题