Forums
This topic is locked
ASP Text Area get length
Replies
Replied 06 Aug 2005 23:04:25
06 Aug 2005 23:04:25 Raafat Abdul replied:
<pre id=code><font face=courier size=2 id=code>
<%@LANGUAGE="JAVASCRIPT" CODEPAGE="1252"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
</head>
<script>
function getLength()
{
var str=document.form1.TXT.value;
var strLength=str.length;
alert(strLength);
}
</script>
<body>
<form name="form1" method="post" action="">
<p>
<textarea name="TXT" id="TXT"></textarea>
</p>
<p>
<input type="button" name="b1" value="Count String Length" onClick="getLength()">
</p>
</form>
</body>
</html>
</font id=code></pre id=code>
<%@LANGUAGE="JAVASCRIPT" CODEPAGE="1252"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
</head>
<script>
function getLength()
{
var str=document.form1.TXT.value;
var strLength=str.length;
alert(strLength);
}
</script>
<body>
<form name="form1" method="post" action="">
<p>
<textarea name="TXT" id="TXT"></textarea>
</p>
<p>
<input type="button" name="b1" value="Count String Length" onClick="getLength()">
</p>
</form>
</body>
</html>
</font id=code></pre id=code>