[thelist] JavaScript: trim function?

Hassan Schroeder hassan at webtuitive.com
Tue Nov 11 19:51:07 CST 2003


Tom Dell'Aringa wrote:

> I have a number like this: 4234.343899238
> 
> I want to trim that to just 4234.34. Anyone have a handy function for
> this before I re-create the wheel?

Math.round() is a built-in JavaScript function ...

<http://devedge.netscape.com/library/manuals/2000/javascript/1.5/reference/math.html#1197725>

HTH!
-- 
Hassan Schroeder ----------------------------- hassan at webtuitive.com
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com

                           dream.  code.





More information about the thelist mailing list