How to get text node after element?

后端 未结 4 1016
太阳男子
太阳男子 2020-11-29 09:23

Using jQuery. I have the following html:

 All the world 

How w

4条回答
  •  广开言路
    2020-11-29 09:37

    Try using the DOM function .nextSibling to pick the next node (including the text nodes) and use nodeValue to get the text All the world

    $(':checkbox')[0].nextSibling.nodeValue
    

提交回复
热议问题