title: QuerySelector set text value
body: <p>I have this loop which should set the <code>&lt;input type="text"/&gt;</code> value to none and update the placeholder.
  When I log the node it works fine but the <code>value</code> and <code>placeholder</code> are not updated? What is wrong?</p>
  
  <p>data is a JSON object.</p>
  
  <pre><code>var data = {"password":"password","username":"xhinii"};
  </code></pre>
  
  <p><strong>JS :</strong></p>
  
  <pre><code>var data = {"password":"password","username":"xhinii"};
  
  for(var prop in data) {
      console.log(document.querySelector('input[name = "' + prop + '"]')); //works fine. logs the node.
      document.querySelector('input[name = "' + prop + '"]').value = ''; //doesn't work
      document.querySelector('input[name = "' + prop + '"]').setAttribute('placeholder', data[prop]);//doesn't work
  }
  </code></pre>