How to convert integer type to amount type in javascript?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/149055/how-can-i-format-numbers-as-money-in-javascript">How can I format numbers as money in JavaScript?</a>  </p>
</blockquote>



<p>In JavaScript I accessed a variable like this:</p>

<pre><code>amount= document.getElementById('&lt;%= DataItemValue1.ClientID%&gt;').firstChild.nodeValue;
</code></pre>

<p>Now if the amount is <code>10945</code> I want it as <code>$10,945</code>; if <code>1098</code> as <code>$1,098</code></p>

<p>How can I do this in javascript and pass it to a label?</p>

<p>Thanks a lot.</p>
