views:

55

answers:

1

Hi guys, I'm doing something like this:

alert(document.getElementById('cardNumber').value);

And it alerts cardNumber value. But I need in it's lenght:

alert(document.getElementById('cardNumber').value.lenght);

undefined

Why?

+5  A: 

It's because the word is spelled 'length'.

Ken Browning
:D I have to sleep now. Thanks.
Ockonal