文本框字符长度动态统计
1.js
<script type="text/javascript">
function setCount() {
var txt = document.getElementById("txtValue");
document.getElementById("count").innerText = txt.value.length + "";
}
setInterval('setCount()', 10);
</script>
2. 文本框
<textarea id="txtValue" style="width:80%;margin-left:5%;margin-top:3%" ></textarea>
3.动态统计显示
<span id="count" style="margin-left:70%"></span>/200