dracoblue.net

.innerHTML vs. value in textarea

Some of you may already noticed, that .innerHTML of an html-object like textarea may not be changed if you edited the objects content manually.

For example setting a textarea's innerHTML won't result in any changes if you do it, right after you manually added text to the textarea.

To workaround this issue, you should always use .value on textarea-fields, even though its declared as:

<textarea>inner html</textarea>
In html, javascript, open source by
@ 23 Oct 2007, Comments at Reddit & Hackernews

Give something back

Were my blog posts useful to you? If you want to give back, support one of these charities, too!

Report hate in social media Campact e.V. With our technology and your help, we protect the oceans from plastic waste. Gesellschaft fur Freiheitsrechte e. V. The civil eye in the mediterranean

Recent Dev-Articles

Read recently

Recent Files

About