Where is my current input value stored?
Consider this code:
If I change the text inside the input field, I know that I can get it through:
$('#my-input').val()document.getElementById('my-input').value
But if I Right click> Inspect, I will see something like:
Is there a way to see the value foobarinside the DOM? If not, where is this value stored?
This question is a browser agnostic, the background, which may be here, is a strange mistake inIE 11.0.14
Is there any way to see it inside the DOM?
DOM (, -, , , Chrome, DOM, . Andrey answer). , , DOM , . , , , , .
, ?
. - , , DOM . HTMLInputElement value , . HTML; value input, . ( defaultValue property.) , , id, id, value ( ).
( HTML) , HTML. , HTML. .
(, Chrome) "", . value , .
In the Firefox debugging tools, you can right-click an item in the DOM viewer and select Use in Console. This will reset the temp variable to the console, which you can use to access the properties of the element (including it .value).


