<script src="jquery-1.4.2.min.js"></script>
<script language="javascript">
$(document).ready(function(){
var text=$("#edit_myfrom textarea").val();
var counter=text.length;
$("#numtj var").text(110-counter);
$(document).keyup(function() {
var text=$("#edit_myfrom textarea").val();
var counter=text.length;
$("#numtj var").text(110-counter);
});
});
</script>
<div id="edit_myfrom" class="editbox">
<form action="" method="post" class="form">
<p id="numtj">你还可以输入<var style="color:#C00">--</var>个字符。</p>
<p class="textinput"><label><textarea name="" cols="" rows="" maxlength="110" style="height:60px; width:400px">在这里面输入文字试试</textarea></label></p>
</form>
</div>
<script language="javascript">
$(document).ready(function(){
var text=$("#edit_myfrom textarea").val();
var counter=text.length;
$("#numtj var").text(110-counter);
$(document).keyup(function() {
var text=$("#edit_myfrom textarea").val();
var counter=text.length;
$("#numtj var").text(110-counter);
});
});
</script>
<div id="edit_myfrom" class="editbox">
<form action="" method="post" class="form">
<p id="numtj">你还可以输入<var style="color:#C00">--</var>个字符。</p>
<p class="textinput"><label><textarea name="" cols="" rows="" maxlength="110" style="height:60px; width:400px">在这里面输入文字试试</textarea></label></p>
</form>
</div>