< 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!
}
}
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn