中文(简体)
<!--把如下代码加入<body>区域中--> <script langauge="javascript"> function check() { var l = document.theform.words.length alert("你已经输入了"+document.theform.words.value.length+"个字母") } </script> <form name="theform"> <INPUT TYPE="text" name = "words" value = "这个输入框中的字母个数能被检测出来" size = 40> <input type="button" value="检测"onClick="check()"> </form>