jQuery get value within child div

后端 未结 8 1702
没有蜡笔的小新
没有蜡笔的小新 2021-02-04 01:50

I need to grab the text value of a child div.

A
B
8条回答
  •  南笙
    南笙 (楼主)
    2021-02-04 02:27

    If you need to go into lists, use this:

    jQuery('.first > ul > li:nth-child(6)').text();

    Example code gets the value of the 6th item in a list.

提交回复
热议问题