<div class="codetitle"> <span><a style="CURSOR: pointer" data="67896" class="copybut" id="copybut67896" onclick="doCopy('code67896')"><u>複製程式碼</u></a></span> 程式碼如下:</div> <div class="codebody" id="code67896"> <br>function commafyback(num) <br>{ <br>f num.split(','); <br>return parseFloat(x.join("")); <br>} <br>function commafy(num) <br>{ <br>num = num.toFixed(2 ) ""; <br>var re=/(-?/d )(/d{3})/ <br>while(re.test(num)){ <br>num=num.replace(re," $1,$2"); <br>} <br>return num; <br>} <br> </div>