title: Button on-click is only working once
body: <p>I can't figure out why the OnClick event won't happen again in my code; see the jsfiddle here:
  <a href="http://jsfiddle.net/btcAx/2/" rel="nofollow">http://jsfiddle.net/btcAx/2/</a></p>
  
  <p>html:</p>
  
  <pre><code>&lt;input id="LoginID" readonly="readonly" type="password" value="UserName"/&gt;
  &lt;br/&gt;
  &lt;input id="LoginPW" readonly="readonly" type="password" value="Password"/&gt;
  &lt;br/&gt;
  &lt;input onclick="change()" type="button" value=" Show/Hide Text " id="ChangeButton"/&gt;
  </code></pre>
  
  <p>JS:</p>
  
  <pre><code>function change() {
    var inp1 = document.querySelector('#LoginID');
    var inp2 = document.querySelector('#LoginPW');
  
    if (inp1.type = "password") {
        inp1.type = "text";
        inp2.type = "text";
    }
    else {
        inp1.type = "password";
        inp2.type = "password";
    }
  }
  </code></pre>
  
  <p>It will change from password to text type, but then it won't change back...</p>