我正在尝试使用Javascript填充
只需通过 document.getElementById('thefield').value = 'value'
设置字段的值。
document.getElementById("aa").innerHTML="Blah Blah";
<textarea id="aa"></textarea>
innerHTML和value都可以正常使用。
在aaaa的位置上,您可以写任何内容。
value
属性指定,当前值由value
属性指定。
document.getElementById("textarea_id").value = "Whatever";
- Ian