title: Auto add comma (,) in text-box with numbers
body: <p>My current coding adds comma (,) when there are 4 or more digits. But instead of
  1101 = 1,101 my code is doing this
  1101 = 110,1... I want it to format and bring the comma to the front. My javascript</p>
  
  <pre><code>&lt;script language="javascript" type="text/javascript"&gt;   
      function AddComma(txt) {
          if (txt.value.length % 4 == 3) {
              txt.value += ",";
          }
      }
  &lt;/script&gt;
  
  
  &lt;asp:TextBox ID="TextBox3" onkeypress="AddComma(this)" runat="server"&gt;&lt;/asp:TextBox&gt;
  </code></pre>
  
  <p>How do i format so the comma is in the front 1,101 or 10,101 or 100,101. </p>