A
A
Arthur2018-03-23 09:45:59
css
Arthur, 2018-03-23 09:45:59

How to remove all tags inside a tag?

Good afternoon.
Let's say there is a line: How to remove all tags inside h2, while leaving all the text? There can be several p tags, one, two, three... And there can be several hundred thousand such lines, so a mass solution is needed. I would be very grateful for an answer.
<h2><p>Текст1</p><p>Текст2</p></h2>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton fon Faust, 2018-03-23
@bubandos

Regulators are not needed here.
This is done with textContent or innerText (depending on the task)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question