To create text area we need the following code:
document.getElementById('btn1').onclick = function () { console.log(document.getElementById('ta1').value.toString()); document.getElementById('txtArea2').value = document.getElementById('txtArea1').value.toString(); };