How to do this? | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
+ 1

How to do this?

I want to make a text area in which the whole text inside is selected if we hover on it.

2nd Oct 2019, 5:42 PM
B.D
B.D - avatar
1 Antwort
+ 6
To select you have to: document.getElementById("myTextarea").select(); and combined in hover, maybe like this: document.getElementById("myTextarea").onmouseover = function(){this.select()};
2nd Oct 2019, 5:53 PM
Dejan Dozet
Dejan Dozet - avatar