+ 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.
1 Resposta
+ 6
To select you have to: document.getElementById("myTextarea").select();
and combined in hover, maybe like this:
document.getElementById("myTextarea").onmouseover = function(){this.select()};