<script language="VBScript">
sub Submit_onclick()
if len(document.form1.textarea.value) > 4 then
alert "对不起,输入的字符数过多!"
exit sub
end if
end sub
</script>
<form name="form1" method="post" action="">
<p> </p>
<p>
<textarea name="textarea"></textarea>
</p>
<p>
<input type="button" name="Submit" value="按钮">
</p>
</form>