Here you can find a number of examples on Java Script.Please find the various kinds of examples listed on the right side of this site. If you don't find anything on Java Script then please write to us or leave a commnet. We are pleased to help and find the solution of your problem.

Javascript: Calculate Text Length



<html>
<head>
<title>Calculate Total Word</title>
<script language="javascript">
function wordcount()
{
var a=f1.t.value;
a=a.split("");
f1.res.value=a.length;
}
</script>
</head>
<body>
<form name="f1">
<input type="text" name="t">
<input type="button" value=Calculate Word onclick="wordcount()">
<input type="text" name="res">
</body>
</html>

No comments:

Post a Comment

Google