+ 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 Answer
+ 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