Textarea.textcontent is not changing

烂漫一生 提交于 2019-12-11 02:09:53

问题


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;

 }

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?


回答1:


Have you tried using the .value attribute to change the text?

https://www.w3schools.com/jsref/prop_textarea_value.asp



来源:https://stackoverflow.com/questions/46550448/textarea-textcontent-is-not-changing

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!