Let's try it yourself. Here is the HTML code, paste it to blank HTML document and you're ready to go.. :D
You can also apply this small utility to your project or webpage.
<title>Character counter</title>
<form method="POST">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100%">
<textarea rows="30" name="charcount" cols="160" wrap="virtual" onkeyup="countit(this)"></textarea>
</td>
</tr>
<tr>
<td width="100%"><div align="right"><p>Jumlah karakter: <input type="text" name="displaycount" size="20" readonly="readonly"></p>
</td>
</tr>
</table>
</form>
<script language="JavaScript">
function countit(what){
formcontent=what.form.charcount.value
what.form.displaycount.value=formcontent.length
}
</script>
Post a Comment