<input name = "code" type = "input" class = "input2" id="code" value="" maxlength="6">
<input type=button onclick="alert(document.all.code.maxLength)" value="GET">