< script>
function sum(){
var str =document.getElementById("text");
var cont=str.value;
var len=cont.length;
document. getElementById("span").innerHTML="You have currently entered " len " characters";
if(len>=100){alert("You can no longer write, the limit has been reached!");
document.getElementById("text").value=cont.substr(0,99);
//Achieve the maximum limit of 100 words. If it exceeds, no more data will be written!
}
}