Good day to all, the question is:
I have in the html file a set of input and span values. Is it possible to create a function that, when the element id passed there, will output the value contained in input or span and change it?
Tried it but it doesn't work, the question is why?
function st(x) { var y = document.getElementById(x); y.innerHTML = "99"; } <input id=something onchange="st(this.id);"> Maybe the question is stupid, do not judge strictly, I am a beginner, in advance HUGE THANKS. ))
inputelement, the value is set by assigning thevalueproperty:y.value = "99";- Igor