黑暗之魂1全余烬:asp中字符的计算

来源:百度文库 编辑:神马品牌网 时间:2024/05/03 03:02:17
我想做一个留言本,其中需要有一个判断:留言超过150字提交不成功,留言小于150提交成功。大家谁知道怎么判断字符数啊
我用了,好象没起作用:
if ( document.len(form1.content.value )>150 )
{
window.alert('字符太多!!');
document.form1.content.focus();
return false;
}不知道哪错了

document.form1.content.value.length>150

if (document.form1.content.value.length>150 )
{
window.alert('字符太多!!');
document.form1.content.focus();
return false;
}

可以用len()