Я хочу извлечь текст только из . Я использую:
Код: Выделить всё
document.querySelectorAll("p > strong")
Код: Выделить всё
NodeList(101) [strong, strong, strong, strong, strong, strong, strong, strong, strong,...]
Код: Выделить всё
document.querySelectorAll("p > strong")[1].innerText
Подробнее здесь: https://stackoverflow.com/questions/691 ... s-selector
Мобильная версия