以下提供3层保险(假设标题长度限制为不超过20字符):
一、表单限制
<input type="text" name="title" id="title" maxlength="20">
二、提交时用js判断
if(document.getElementById("title").value.length>20){alret("标题不能超过20字!";}
三、后台判断
if Len(Request.form("title")) > 20 then
response.write "标题不能超过20字!"
end if