Hi I have a html form with the following code
<td ><label>
<textarea name="comments" id="comments"
cols="100" rows="3"
onkeyup="illegal()" </td>
when the js function ‘illegal’ is called part of the code is
cm = document.form1.comments.value
cl = cm.length
But what ever the string length is, the result is an additional 13 characters ?
can anybody help me please ?
One problem you have there is that you haven’t closed your textarea, though I don’t know that it would cause the particular issue you’re seeing.
I tried the following simple page:
It works fine — every time you type, it pops up the number of characters. Correctly. I’ve tried it in Chrome and in Firefox.