<html>
<head>
<script src="jquery.js" type="text/javascript"></script>
<script type="text/javascript">
function tjzs(){
var count = $("#nr").val().length;
if(count>10){
var nr = $("#nr").val().substring(0,10);
$("#nr").val(nr);
count=10;
}
$("#zs").val(count);
}
</script>
</head>
<body>
<div style="72px;width:202px;" >
<textarea id="nr" style="height:70px;width:200px;" onkeyup="tjzs()" onpropertychange="if (value.length>10) value=value.substring(0,10)"></textarea>
字数限制:<input type="text" id="zs" value="0" lang="4"/>0/10
</div>
</body>
</html>