<input name = "code" type = "input" class = "input2" id="code" value="" maxlength="6">
<input type=button onclick="alert(document.all.code.maxLength)" value="GET">
<input type=button onclick="alert(document.all.code.maxLength)" value="GET">
maxLength
如果再遇到此类问题可以用如下代码查看其属性
<script>
var obj=document.all.t1;
for(i in obj)
{
document.write(i+":"+obj[i]+"<BR>");
}
alert(document.all.t1.maxLength);
</script>