I have a web page in which there is an input field containing text "0" (when the page loads). There is a button in the page. When I click it, there is a small function that runs and the text in the aforementioned field changes to "20". But, when I try to get the element value, I still get "0", i.e., the same value before clicking the button.
<input type="text" class="form-control" value="0" data-bind="value: ShippingTotal() == '0' ? '0' : ShippingTotal()" disabled="">
How can I extract the true value from the input field?
It seems that although '20' is entered into the field, the "value" attribute still remains '0'.
Try this:
You could double click the field and copy the value.