title: How to use javascript to get html special characters in text input
body: <p>I want to sent some html special character to text field and then later use javascript to get it back in its original format: like if I sent "&amp;pi", it will shows "π" on the text input, and when I use javascript to get it back, I should get "&amp;pi", but I only can get "π", not "&amp;pi". Please help, my code is like the following: </p>
  
  <pre><code>&lt;script type="text/javascript"&gt; 
  function qpush(a) {
      document.getElementById('input').value += a;
  }
  
  function show(a) {
      alert(document.getElementById('input').value);
  }
  &lt;/script&gt;
  
  &lt;input type="text" id="input" /&gt;
  &lt;input type="button" onclick="qpush('&amp;pi;');" value="&amp;pi;" /&gt;
  &lt;input type="button" onclick="show()" value="go" /&gt;
  </code></pre>