HighDots Forums  

Komisches parseInt

Javascript (German) Programmiersprache JavaScript. (de.comp.lang.javascript)


Discuss Komisches parseInt in the Javascript (German) forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Matthias Metze
 
Posts: n/a

Default Komisches parseInt - 07-23-2003 , 03:09 PM






Hallo NG,

kurioses Problem:

nr1 = "07";
nr2 = "08";
alert(parseInt(nr1));
alert(parseInt(nr2));

Das erste alert ergibt 7, das zweite 0 statt 8.
Wer weiss warum?
Und wie kann ich das ändern?

fragt
Matthias

Reply With Quote
  #2  
Old   
Matthias Metze
 
Posts: n/a

Default Re: Komisches parseInt - 07-24-2003 , 08:09 AM






In article <j2qhzsh5wuk2$.11nvjyldnsi1c.dlg (AT) 40tude (DOT) net>,
Jan Michel <janmichel (AT) web (DOT) de> wrote:

Quote:
parseInt(nr1,10);
sollte jeden Browser überzeugen, die Zahl im Dezimalsystem zu
interpretieren.
Danke, das wars!


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.