Jo,
Danke, das wars
mfG - D. Lütje
---
\\|||// //|||\\
| | (° °)
(.) (.) "
==============oOO==(_)==OOo=============ººO===¯==Oºº==============
Dieter Lütje, Kernkraftwerk Krümmel, Elbuferstr. 82, D-21502 Geesthacht.
Tel.: +49 (0)4152 - 15 23 25, Fax: +49 (0)4152 - 15 23 39.
E-Mail: [EMAIL PROTECTED]
PGP-Key at: idap://certserver.pgp.com or
PGP-Fingerprint: C52A 5AEC 91B1 7F84 3BCA F406 43AE 8845 27CC 09BA
> -----Ursprüngliche Nachricht-----
> Von: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Im Auftrag von Albert Weinert
> Gesendet: Mittwoch, 26. Oktober 2005 15:31
> An: [email protected]
> Betreff: Re: [Coffeehouse] Javascript-Problem
>
> Lütje Dieter (KKK TKEK) schrieb:
>
>
> > var test = 1;
> > document.write( test + ' - ' + test.toString.length);
> >
> > Das liefert mir dann auch wie gewünscht die Ausgabe "1 - 1"
> >
> > Wenn nun aber test=12 ist, erhalte ich "12 - 1", oder bei
> test=123 "123 - 1"
> >
> > Wie um alles in der Welt soll ich das verstehen?
>
> toString() ist eine Methode
>
> also:
>
> document.write( test + ' - ' + test.toString().length);
>
> > Oder anders gefragt: Wie
> > kriege ich in Javascript 'ne Zahl mit x führenden Nullen hin ( 1 =
> > "0001",
> > 12 = "0012", 123 = "0123" ) ?
>
> Entsprechende Nullen anhand Stellenzahl davor stellen.
>
>
> --
> Freundliche Grüße
>
> Albert Weinert
> _______________________________________________
> Coffeehouse Mailingliste, Postings senden an:
> [email protected]
> An-/Abmeldung und Suchfunktion unter:
> http://www.glengamoi.com/mailman/listinfo/coffeehouse
>
_______________________________________________
Coffeehouse Mailingliste, Postings senden an:
[email protected]
An-/Abmeldung und Suchfunktion unter:
http://www.glengamoi.com/mailman/listinfo/coffeehouse