中文(繁体)
<!--把如下程式碼加入<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>