I am trying to make a sign-in system, and currently I am just using document.createElement('input')
to create the input element then appending it to the container element.
But, when I try to access the value
property later, it is not updating. I am really confused because when I select the input element in the Elements panel and then type $0.value
in the console, the value is correct. It turns out inputElementCreatedInJavascript != $0
. Shouldn’t they be the same object?!?
I have no idea how to solve this problem – I always thought that all referneces to an element were the same. Can someone explain this to me?!?