The select() method of the HTMLTextAreaElement interface selects the entire contents of the textarea element.
select()
MDN Reference