how to focus textarea on button click in javascript code example Example: js focus textarea document.getElementById(IdOfTextArea).focus();