Javascript str.length method
<html>
<head>
<title>Javascript string length</title>
</head>
<body>
<h1>Javascript string length</h1>
<p id="s"></p>
<input type="text" onkeyup="getLen(this)" placeholder="Enter here" />
<script>
function getLen(t) {
var x = document.getElementById('s');
x.innerHTML = t.value.length;
}
</script>
</body>
</html>