M
M
Marat Rakhmatullin2019-11-20 10:04:04
JavaScript
Marat Rakhmatullin, 2019-11-20 10:04:04

What is the easiest way to select values ​​by html tag?

Example: prices are enclosed between tags <span class="price-wrapper"> цена </span>, how to copy only prices from the whole page.
It seems to me that there is already a service for this, or maybe the chromium dev-console can do this? (but I don't know where to click there)
How would you solve such a problem in the quickest and easiest way?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
weraleto, 2019-11-20
@weraleto

document.querySelectorAll('span.price-wrapper').textContent;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question