dotmee
0
Q:

html set textarea value

<textarea rows="10" cols="25">
  The cat was playing in the garden.
</textarea>
14
<textarea class="article-input" id="article-input" type="text" rows="9" >{{article}}</textarea> 
1

    <label for="w3review">Review of W3Schools:</label>

<textarea 
    id="w3review" name="w3review" rows="4" cols="50">

      At w3schools.com you will learn how to make a website. They offer free tutorials in all web development technologies. 

      </textarea>
 
-1
// To set the textarea value, you must insert the TEXT into the element.
<textarea>VALUE</textarea>
// javascript
var textarea = `<textarea>${value}</textarea>`;
document.getElementById('my_textarea_id').textContent = 'foo'
// php
$value = 'foo';
$textarea = "<textarea>$value</textarea>";
echo $textarea;
0

New to Communities?

Join the community