new InputElementButton(tag, label)
Parameters:
Name | Type | Description |
---|---|---|
tag |
string | The name of the element |
label |
string | The text displayed in the button |
- Source:
Example
var saveButton = new InputElementButton('btnSave','Save');
Extends
Methods
-
appendTo(parent)
-
Appends the derived object to a DOM node
Parameters:
Name Type Description parent
Object The DOM element to which this is added - Inherited From:
- Source:
-
disable()
-
Disables the object
- Inherited From:
- Source:
-
enable()
-
Enables the object
- Inherited From:
- Source:
-
getValue() → {mixed}
-
Retrieves a value previously attached to an InputElementButton object.
- Source:
Returns:
The attached value- Type
- mixed
-
onChange(listener)
-
Attaches an onchange handler to the object
Parameters:
Name Type Description listener
function The event listener to add - Inherited From:
- Source:
-
onClick(listener)
-
Attaches an onclick handler to the object
Parameters:
Name Type Description listener
function The event listener to add - Inherited From:
- Source:
-
setLabel(newText)
-
Changes the label of an InputElementButton object
Parameters:
Name Type Description newText
string The new text to display in the button - Source:
Example
if (helpIsNowDisplayed) { btnShowHelp.setLabel('Hide'); }
-
setStyle(ss)
-
Changes the style of the button
Parameters:
Name Type Description ss
string The new style to apply to the button - Source:
-
setValue(v)
-
Attaches a value to an InputElementButton object
Parameters:
Name Type Description v
mixed The value to attach - Source: