How to change the Content of a textarea with Javascript?

How to change the Content of a <textarea> with Javascript?
While writing an article on today, i cam to know that need to set one of the <textarea> control to blank/empty value during run time. So here is an option to perform this action using javascript,

document.getElementById('contentID').value = '';
Where you have
<textarea id="contentID" name="test">Text to be removed.</textarea>




If you feel this is helpful or you like it, Please share this using share buttons available on page.

Comments

Popular posts from this blog

Auto Scroll in Common Controls

Convert typed library (.tlb) to .net assembly?

Disable close button on form - C#