Class InputElementButton
Extends
InputElement.
A button object, with an optional event listener
Defined in: inputElement.js.
Constructor Attributes | Constructor Name and Description |
---|---|
InputElementButton(tag, label)
|
Method Attributes | Method Name and Description |
---|---|
getValue()
Retrieves a value previously attached to an InputElementButton object.
|
|
setLabel(newText)
Changes the label of an InputElementButton object
|
|
setValue(v)
Attaches a value to an InputElementButton object
|
Class Detail
InputElementButton(tag, label)
var saveButton = new InputElementButton('btnSave','Save');
- Parameters:
- {string} tag
- The name of the element
- {string} label
- The text displayed in the button
Method Detail
{mixed}
getValue()
Retrieves a value previously attached to an InputElementButton object.
- Returns:
- {mixed} The attached value
setLabel(newText)
Changes the label of an InputElementButton object
if (helpIsNowDisplayed) { btnShowHelp.setLabel('Hide'); }
- Parameters:
- {string} newText
- The new text to display in the button
setValue(v)
Attaches a value to an InputElementButton object
- Parameters:
- {mixed} v
- The value to attach