title: Change input type="text" to input type="password" onfocus()
body: <p>So far I have accomplished the 1st part, I successfully change the input type from text to password with this javascript:</p>
  
  <pre><code>function replaceT(obj) {
          var newO = document.createElement('input');
          newO.setAttribute('type', 'password');
          newO.setAttribute('class', 'textbox');
          newO.setAttribute('name', obj.getAttribute('name'));
          obj.parentNode.replaceChild(newO, obj);
          newO.focus();
      } 
  </code></pre>
  
  <p>and ASP code:</p>
  
  <pre><code>&lt;asp:TextBox ID="txtPassword" runat="server" SkinID="txtLogin" value="Password..." TabIndex="2" onfocus="replaceT(this)"&gt;&lt;/asp:TextBox&gt;
  </code></pre>
  
  <p>What I want is the second part. How to return the "<em>Password...</em>" value onblur.</p>
  
  <p>In short, I want to implement a facebook-like password textbox. A <strong>placeholder</strong> attribute that function on IE.</p>
  
  <p>Here how it goes before <code>focus()</code>:</p>
  
  <p><img src="https://i.stack.imgur.com/essDb.png" alt="enter image description here"></p>
  
  <p>then after focus:</p>
  
  <p><img src="https://i.stack.imgur.com/hsku9.png" alt="enter image description here"></p>
  
  <p>then return to this <code>onblur()</code>:</p>
  
  <p><img src="https://i.stack.imgur.com/essDb.png" alt=""></p>
  
  <p>Thank you.</p>
  
  <p>P.S.</p>
  
  <p>I want to implement this without jQuery(pure javascript) and I am working with IE 7+.</p>