javascript - <textarea onclick="this.value; this.select();"> ? What kind of trick is this? -


working somebody's code, saw this:

<textarea onclick="this.value; this.select();">(some predefined stuff)</textarea> 

what kind of trick / hack , supposed do?

the statement

this.value; 

will have no effect. following statement:

this.select(); 

will cause contents of <textarea> selected.


Comments

Popular posts from this blog

How has firefox/gecko HTML+CSS rendering changed in version 38? -

android - CollapsingToolbarLayout: position the ExpandedText programmatically -

Listeners to visualise results of load test in JMeter -