开发者

Javascript field value length [closed]

开发者_StackOverflow This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. Closed 9 years ago.

I'm doing something like this:

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

And it alerts cardNumber value. But I need in its length:

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

undefined

Why?


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜