title: Format Numbers in K,Lacs,Crore
body: <p>I'd like to format numbers into the numbers next to them with k, lacs, crores in jQuery:</p>
  <p>1000 to 1K</p>
  <p>1500 to 1.5K</p>
  <p>100000  to 1Lac</p>
  <p>150000   to 1.5Lac</p>
  <p>1000000  to 10Lac</p>
  <p>10000000   to 1cr and so on !</p>
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
      &lt;title&gt;Number Differentiation&lt;/title&gt;
      &lt;script src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js&quot;&gt;&lt;/script&gt;
      &lt;script type=&quot;text/javascript&quot;&gt;
          $(document).ready(function(e){
                $('#numbr').bind('keypress', function (e) {
                                  return (e.which != 8 &amp;&amp; e.which != 0 &amp;&amp; (e.which &lt; 48 || e.which &gt; 57) &amp;&amp; e.which != 46) ? false : true;
                });
              $(&quot;#submitBut&quot;).click(function(e){
  
                  alert(numDifferentiation( $(&quot;#numbr&quot;).val()))
              })
              function numDifferentiation($val){
                 return $val;
              }
          })
      &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;input id=&quot;numbr&quot; type=&quot;text&quot;/&gt;
  &lt;button id=&quot;submitBut&quot;&gt;Click&lt;/button&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>