maxlength for a number input javascript code example Example: input max length <input maxlength="10" />