parseInt("42") // result = 42
parseInt("42.33") // result = 42
parseFloat("42") // result = 42
parseFloat("42.33") // result = 42.33
Carl Olsen, MCSE
Des Moines, Iowa
http://carl-olsen.com/
> -----Original Message-----
> From: Juan Carlos Aldazosa Figliozzi [mailto:sapet26@h...]
> Sent: Saturday, September 14, 2002 6:00 AM
> To: JavaScript HowTo
> Subject: [javascript_howto] how to convert char to int
>
> I need to use a value introduced in a text box, it must be a number,
and
> i need it for loops, but its treated as char, how can i convert it to
> int?, to use it in a do-while for example.
>
> ---
>
> Improve your web design skills with these new books from Glasshaus.
>
> Usable Web Menus
>
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
> r-20
> Constructing Accessible Web Sites
>
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
> r-20
> Practical JavaScript for the Usable Web
>
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
> r-20
> to unsubscribe send a blank email to leave-javascript_howto-
> 1112139T@p...