SyntaxFix
Write A Post
Hire A Developer
Questions
The W3C solution:
var len = document.getElementById("input1").length;