Hi below is my code,
<textarea id="textArea"></textarea>
<button class="btn" onclick="appendText()">Append Text</button>
<script>
function appendText()
{
var textarea=document.getElementById('textArea');
var t = document.createTextNode("Hello World \n");
textarea.appendChild(t);
}
<script>
before type anything in textarea this code will append 'Hello World' to textarea, if anything manually typed and click button means this code will not append 'Hello World' to textarea, why append not working after typing in textarea ? Anyhelp appreciated