You are here: irt.org | FAQ | JavaScript | Form | 11 | Q966 [ previous next ]
Only in Internet Explorer 4+:
<form name="myForm">
<input type="text" name="myField" maxlength="10">
</form>
<script language="JavaScript"><!--
if (document.all)
document.myForm.myField.maxLength = 5;
//--></script>