📜  html 设置 textarea 值 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:10.136000             🧑  作者: Mango

代码示例2
// To set the textarea value, you must insert the TEXT into the element.

// javascript
var textarea = ``;
document.getElementById('my_textarea_id').textContent = 'foo'
// php
$value = 'foo';
$textarea = "";
echo $textarea;