Autor Zpráva
Limoto
Profil
proč tohle nefunguje?

if(rok.lenght == 4)
{
rok = rok.substr(2,4);
}
matak
Profil
length
Leo
Profil
Protoze lenght je nejspis rovno undefined, ale ne 4. Leo
peta
Profil
Limoto
Viz matak lengTH nikoliv lengHT
Viz Leo, bez zbytku kodu tezko rici, chces nemozne.

var rok="1234";
if (rok.length == 4) {rok = rok.substr(2,4);}
alert(rok);
alert(rok.lenght); //test1
alert(rok.length); //test2


Mne to funguje bezchybne.
Toto téma je uzamčeno. Odpověď nelze zaslat.

0