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? -

javascript - Complex json ng-repeat -

jquery - Cloning of rows and columns from the old table into the new with colSpan and rowSpan -