Typically we run javascript code to set any value:
document.getElementById('id_name').value = "...";
But I have a page like this:
<div id="id_name">
<div class="class_name">
<textarea></textarea>
</div>
</div>
How to set a value of the textarea by javascript?
Thanks a lot for help!
You could do this, if your HTML is really that simple:
There’s also a “getElementsByClassName()” in newer browsers that could be used to find the “class_name”
<div>element, from which you’d do the “getElementsByTagName()” call.