kar*_*m79 17
function addText(elId,text) {
document.getElementById(elId).value += text;
}
Run Code Online (Sandbox Code Playgroud)
要么:
function addText(elId,text) {
var obj = document.getElementById(elId);
var txt = document.createTextNode(text);
obj.appendChild(txt);
}
Run Code Online (Sandbox Code Playgroud)