Hi all
How can i convert a string from a textbox to a numeric value?
Thanks!
Printable View
Hi all
How can i convert a string from a textbox to a numeric value?
Thanks!
Are you talking about JavaScript?
In which case you have to remember JS doesn't really have proper datatypes.
Whatever you first initialise a var it will take the type of whatever it is you used to initialise it with.
There are however two functions
Code:num = parseInt(textbox.value);
num = parseFloat(textbox.value);
thanks a lot .. it helped me enough!
Hi again.. and now.. how can i convert a numeric to a string ?
Thanks!
See your "length of value" thread :)
Yes.. I already saw it! Thanks.. I have another question for you.. see the other thread again.
What's the question?