Possible Duplicates:
How to parseInt a string with leading 0
Workarounds for JavaScript parseInt octal bug
How can I parse the "09" into number?
alert(parseInt("09"));This returns me 0 ..Why is that and how do I fix this?
Possible Duplicates:
How to parseInt a string with leading 0
Workarounds for JavaScript parseInt octal bug
How can I parse the "09" into number?
alert(parseInt("09"));This returns me 0 ..Why is that and how do I fix this?
Specify the base as well:
alert(parseInt("09", 10)); // outputs 9