Textarea.textcontent 没有改变 [英] Textarea.textcontent is not changing
本文介绍了Textarea.textcontent 没有改变的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个选择对象,其 onChange 事件正在调用此方法:
I have a select object whose onChange event is calling this method:
function universeChange()
{
var select = document.getElementById("universeSelect");
form = document.getElementById("textAreaUniverse");
//form.textContent = universeDict[select.selectedIndex].value;
form.textAreaValue = universeDict[select.selectedIndex].value;
}
当我在开发人员工具中调试时,textContent 值会发生变化,因为它应该发生变化,但客户端并未反映新值.我有这种感觉,我没有使用正确的方法来更改 textarea 的值?
When I am debugging in developer tools the textContent value changes as it should change but the clients end doesn't reflect the new values. I have this feeling that I am not using the correct method to change the value of the textarea?
推荐答案
您是否尝试过使用 .value 属性来更改文本?
Have you tried using the .value attribute to change the text?
https://www.w3schools.com/jsref/prop_textarea_value.asp
这篇关于Textarea.textcontent 没有改变的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文