How to set value into input that place next from function javascript ?
When tested this code, input id="yyy"
will get value = 123
It's ok.
And input id="xxx"
will blank result and show error. It's ok. i understand.
But if i want to get value = 123
to input id="xxx"
with this code (input id="xxx"
place next from function javascript)
How can i do that ? It's possible ?
<form>
<input type="text" name="yy" id="yy"/>
</form>
<script>
var test = "123";
document.getElementById('yy').value = test;
document.getElementById('xx').value = test;
</script>
<br>
<form>
<input type="text" name="xx" id="xx"/>
</form>