且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

通过Ajax调用加载文本到文本区域

更新时间:2023-10-17 21:41:40

您需要设置文本区域的价值。

You need to set the text areas value.

$("#textareaID").val("value of text area");

我把这个成头部引用查询一个空白的HTML文档,它能正常工作。

I put this into a blank HTML doc referenced query in the head and it worked fine.

<form>
  <textarea id="test"></textarea>
</form>
<script>
    $('#test').val('testing');
</script>