title: HTML input value attribute - same input, (apparently) different results
body: <p>How does value attribute work for the html input tag after an edit via the inputbox?</p>
  
  <p>example:</p>
  
  <pre><code>&lt;input type="text" name="test" id="test" value="Hello world" /&gt;
  </code></pre>
  
  <p>this will show an input box with the text "Hello world". If I edit it inputing a new string into the rendered textbox (not via raw code), and then try to get his value using js like this</p>
  
  <pre><code>alert(document.getElementById('test').value)
  </code></pre>
  
  <p>I'll, correctly, get the NEW value. 
  But if I inspect the element through chrome developer tools (or firebug or anything you prefer), I'll see the same "Hello world" string as it was in the beginning..</p>
  
  <p>Which of the two is the right one? js value or chrome inspector?</p>
  
  <p>Here's the <a href="http://jsfiddle.net/BwnEK/1/" rel="noreferrer">Example Fiddle</a> and here's a screenshot<img src="https://i.stack.imgur.com/vNVvP.png" alt="enter image description here"></p>
  
  <p>I came up to this while trying to find a solution to this problem: Classic shop situation, I have a table with X inputs tag  , where an user can input the quantity of X items. I need to check if one or more values have changed since the previous value of each input: if the comparison between OLD and NEW val returns that the valuehas changed, I need to update the order. Otherwise there's no need to save/update.</p>
  
  <p>I thought I could use attr. "value" to store the "old" value of the input, but probably was not the best choice..</p>
  
  <p>Can anyone explain this behaviour? It's only a "refresh" problem or is there something else behind?</p>