Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

html set textarea value

// 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;
 
PREVIOUS NEXT
Tagged: #html #set #textarea
ADD COMMENT
Topic
Name
4+5 =