S
S
sasuke222020-06-17 09:55:55
JavaScript
sasuke22, 2020-06-17 09:55:55

How to highlight row text in a table when clicked?

Hello everyone! When clicking, highlight the text of the column, how can this be implemented?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Stalker_RED, 2020-06-17
@sasuke22

const row = document.querySelector('tr.select_me')
window.getSelection().selectAllChildren(row)

The topic is well covered on MDN and learn.javascript.ru , see articles about Selection and Range

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question