joecool2005 Posted March 17, 2011 Share Posted March 17, 2011 Hi,When I dodocument.write(parseInt("02"));it displays 2but when I dodocument.write(parseInt("08"));it displays 0 instead of 8.Why?ThxJoe Link to comment Share on other sites More sharing options...
Ingolme Posted March 17, 2011 Share Posted March 17, 2011 Try using parseInt("08",10) instead.It's trying to interpret it as octal but 8 isn't a valid octal digit so it's ignoring it. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.