I just wondering why I get the error when I do the following:
function something(id){
return document.getElementById(id).value;
}
something('id') = 'hello';
But I can do this without error:
document.getElementById('id').value = 'hello';
They are suppose just the same thing, right?
Of course, assume there is an input element with id, named 'id'.
Thanks.