String.Length This allows you to test the length of the string. Oh, this will help you get started with JS friends.
Gets the length instance of a string
<script type= "text/web Effects" language= "JavaScript" >
<!--//
onload = function () {
var myString = "AAA";
document.write (myString + "has a length of" + Mystring.length + "characters.");
}
-->
</script>
<body>
</body>
A more detailed example.
<script language= "JavaScript"
< !--
var myString1 = new String ("Hello, World");
var myString2 = new String ("Here is a longer string");
var myString3 = new String ("Here is a even longer string");
document.write (myString1 + ": is" + mystring1.length);
document.write ("Characters long.<br>");
document.write (myString2 + ": is" + mystring2.length);
document.write ("Characters long.<br>");
document.write (MyString3 + ": is" + mystring3.length);
document.write ("Characters long.<br>");
document.close ();
;
</script>