<script>
function saveTXT() {
document.WRITEMSGTXT.words.value = trim(document.WRITEMSGTXT.words.value);
if(document.WRITEMSGTXT.words.value.length == 0) {
alert("留言不能为空!");
return false;
} else if(document.WRITEMSGTXT.words.value.length > 1000) {
alert("留言不能超过1000字!");
return false;
}
}
function textCounter(field, maxlimit) {
if (field.value.length > maxlimit)
field.value = field.value.substring(0, maxlimit);
else
document.WRITEMSGTXT.remLen.value = maxlimit - field.value.length;
}
</script>
<table width=447 border=0 cellpadding=0 cellspacing=0 bgcolor=#eaffe0>
<form name=WRITEMSGTXT method="post" οnsubmit="return saveTXT()">
<tr>
<td width=50% colspan=3></td>
<td align=right><font color=46A718>剩余字数:<input name=remLen value=1000 readonly type=text size=4 maxlength=3
style="background-color: #eaffe0; border: 0; color: red"></font></td>
</tr>
</table>
<table width=447 border=0 cellpadding=0 cellspacing=0>
<tr align=center>
<td colspan=3><textarea name=words style="width:445px" rows=3 class=input1 onPropertyChange="textCounter
(WRITEMSGTXT.words, 1000)">