The focus() method gives the focus to the text area. Here is the first text area. Here is the second text area. onClick="setFocus(2)">