<html>
<script type="text/javascript">
function numberOfCharacters(textbox,limit,indicator) {
chars = document.getElementById(textbox).value.length;
document.getElementById(indicator).innerHTML = limit-chars;
}
</script>
<body>
<label for="mytextbox">
Message (140 char. max.)
<span id="indicator">140</span>
</label>
<br/>
<textarea id="mytextbox" rows="2" cols="40" onkeyup="numberOfCharacters('mytextbox',140,'indicator');"></textarea>
</body>
</html>
thanks akhil........
ReplyDelete