search

goog.ui.CharCounter

Provided By
Extends
All Implemented Interfaces

CharCounter widget. Counts the number of characters in a input field or a text box and displays the number of additional characters that may be entered before the maximum length is reached.

new CharCounter( elInput, elCount, maxLength, opt_displayMode )

Parameters
elInput(HTMLInputElement|HTMLTextAreaElement|null)

Input or text area element to count the number of characters in.

elCount(Element|null)

HTML element to display the remaining number of characters in. You can pass in null for this if you don't want to expose the number of chars remaining.

maxLengthnumber

The maximum length.

opt_displayModegoog.ui.CharCounter.Display=

Display mode for this char counter. Defaults to goog.ui.CharCounter.Display.REMAINING.

Instance Methods

Instance Properties

Enumerations