DOM.HTMLInputElement

KDE 4.5 PyKDE API Reference

- KDE's Python API

# HTMLInputElement Class Reference

`from PyKDE4.khtml import *`

Inherits: DOM.HTMLElement → DOM.Element → DOM.Node
Namespace: DOM

## Detailed Description

Form control. Note. Depending upon the environment the page is being viewed, the value property may be read-only for the file upload input type. For the "password" input type, the actual value returned may be masked to prevent unauthorized use. See the <a href="http://www.w3.org/TR/REC-html40/interact/forms.html#edef-INPUT"> INPUT element definition in HTML 4.0.

## Methods
| __init__ (self)
| __init__ (self, DOM.HTMLInputElement other)
| __init__ (self, DOM.Node other)
DOM.DOMString | accept (self)
DOM.DOMString | accessKey (self)
DOM.DOMString | align (self)
DOM.DOMString | alt (self)
| blur (self)
bool | checked (self)
| click (self)
bool | defaultChecked (self)
DOM.DOMString | defaultValue (self)
bool | disabled (self)
| focus (self)
DOM.HTMLFormElement | form (self)
long | getSize (self)
bool | indeterminate (self)
long | maxLength (self)
DOM.DOMString | name (self)
bool | readOnly (self)
| select (self)
long | selectionEnd (self)
long | selectionStart (self)
| setAccept (self, DOM.DOMString a0)
| setAccessKey (self, DOM.DOMString a0)
| setAlign (self, DOM.DOMString a0)
| setAlt (self, DOM.DOMString a0)
| setChecked (self, bool a0)
| setDefaultChecked (self, bool a0)
| setDefaultValue (self, DOM.DOMString a0)
| setDisabled (self, bool a0)
| setIndeterminate (self, bool a0)
| setMaxLength (self, long a0)
| setName (self, DOM.DOMString a0)
| setReadOnly (self, bool a0)
| setSelectionEnd (self, long offset)
| setSelectionRange (self, long start, long end)
| setSelectionStart (self, long offset)
| setSize (self, DOM.DOMString a0)
| setSize (self, long a0)
| setSrc (self, DOM.DOMString a0)
| setTabIndex (self, long a0)
| setType (self, DOM.DOMString a0)
| setUseMap (self, DOM.DOMString a0)
| setValue (self, DOM.DOMString a0)
DOM.DOMString | size (self)
DOM.DOMString | src (self)
long | tabIndex (self)
DOM.DOMString | type (self)
DOM.DOMString | useMap (self)
DOM.DOMString | value (self)

## Method Documentation

__init__ | ( |  | self ) |

__init__ | ( | self, |
|  | DOM.HTMLInputElement | other
| ) |  |  |

__init__ | ( | self, |
|  | DOM.Node | other
| ) |  |  |

DOM.DOMString accept | ( |  | self ) |

A comma-separated list of content types that a server processing this form will handle correctly. See the <a href="http://www.w3.org/TR/REC-html40/interact/forms.html#adef-accept"> accept attribute definition in HTML 4.0.

DOM.DOMString accessKey | ( |  | self ) |

A single character access key to give access to the form control. See the <a href="http://www.w3.org/TR/REC-html40/interact/forms.html#adef-accesskey"> accesskey attribute definition in HTML 4.0.

DOM.DOMString align | ( |  | self ) |

Aligns this object (vertically or horizontally) with respect to its surrounding text. See the <a href="http://www.w3.org/TR/REC-html40/struct/objects.html#adef-align-IMG"> align attribute definition in HTML 4.0. This attribute is deprecated in HTML 4.0.

DOM.DOMString alt | ( |  | self ) |

Alternate text for user agents not rendering the normal content of this element. See the <a href="http://www.w3.org/TR/REC-html40/struct/objects.html#adef-alt"> alt attribute definition in HTML 4.0.

blur | ( |  | self ) |

Removes keyboard focus from this element.

bool checked | ( |  | self ) |

Describes whether a radio or check box is checked, when type has the value "Radio" or "Checkbox". The value is true if explicitly set. Represents the current state of the checkbox or radio button. See the <a href="http://www.w3.org/TR/REC-html40/interact/forms.html#adef-checked"> checked attribute definition in HTML 4.0.

click | ( |  | self ) |

Simulate a mouse-click. For INPUT elements whose type attribute has one of the following values: "Button", "Checkbox", "Radio", "Reset", or "Submit".

bool defaultChecked | ( |  | self ) |

When type has the value "Radio" or "Checkbox", stores the initial value of the checked attribute.

DOM.DOMString defaultValue | ( |  | self ) |

Stores the initial control value (i.e., the initial value of value ).

bool disabled | ( |  | self ) |

The control is unavailable in this context. See the <a href="http://www.w3.org/TR/REC-html40/interact/forms.html#adef-disabled"> disabled attribute definition in HTML 4.0.

focus | ( |  | self ) |

Gives keyboard focus to this element.

DOM.HTMLFormElement form | ( |  | self ) |

### KDE 4.0: remove.

long getSize | ( |  | self ) |

Size information. The precise meaning is specific to each type of field. See the <a href="http://www.w3.org/TR/REC-html40/interact/forms.html#adef-size-INPUT"> size attribute definition in HTML 4.0.

bool indeterminate | ( |  | self ) |

Describes whether a radio box is indeterminate

long maxLength | ( |  | self ) |

Maximum number of characters for text fields, when type has the value "Text" or "Password". See the <a href="http://www.w3.org/TR/REC-html40/interact/forms.html#adef-maxlength"> maxlength attribute definition in HTML 4.0.

DOM.DOMString name | ( |  | self ) |

Form control or object name when submitted with a form. See the <a href="http://www.w3.org/TR/REC-html40/interact/forms.html#adef-name-INPUT"> name attribute definition in HTML 4.0.

bool readOnly | ( |  | self ) |

This control is read-only. When type has the value "text" or "password" only. See the <a href="http://www.w3.org/TR/REC-html40/interact/forms.html#adef-readonly"> readonly attribute definition in HTML 4.0.

select | ( |  | self ) |

Select the contents of the text area. For INPUT elements whose type attribute has one of the following values: "Text", "File", or "Password".

long selectionEnd | ( |  | self ) |

Returns the character offset of end of selection, or if none, the cursor position. This operation is only supported if the type of this element is text; otherwise -1 is returned. NOTE: this method is not part of the DOM, but a Mozilla extension

long selectionStart | ( |  | self ) |

Returns the character offset of beginning of selection, or if none, the cursor position. This operation is only supported if the type of this element is text; otherwise -1 is returned. NOTE: this method is not part of the DOM, but a Mozilla extension

setAccept | ( | self, |
|  | DOM.DOMString | a0
| ) |  |  |

see accept

setAccessKey | ( | self, |
|  | DOM.DOMString | a0
| ) |  |  |

see accessKey

setAlign | ( | self, |
|  | DOM.DOMString | a0
| ) |  |  |

see align

setAlt | ( | self, |
|  | DOM.DOMString | a0
| ) |  |  |

see alt

setChecked | ( | self, |
|  | bool | a0
| ) |  |  |

see checked

setDefaultChecked | ( | self, |
|  | bool | a0
| ) |  |  |

see defaultChecked

setDefaultValue | ( | self, |
|  | DOM.DOMString | a0
| ) |  |  |

see defaultValue

setDisabled | ( | self, |
|  | bool | a0
| ) |  |  |

see disabled

setIndeterminate | ( | self, |
|  | bool | a0
| ) |  |  |

see indeterminate

setMaxLength | ( | self, |
|  | long | a0
| ) |  |  |

see maxLength

setName | ( | self, |
|  | DOM.DOMString | a0
| ) |  |  |

see name

setReadOnly | ( | self, |
|  | bool | a0
| ) |  |  |

see readOnly

setSelectionEnd | ( | self, |
|  | long | offset
| ) |  |  |

Move the end of the selection (and the cursor) to the given offset in text This call has no effect if the type of this input element isn't text NOTE: this method is not part of the DOM, but a Mozilla extension

setSelectionRange | ( | self, |
|  | long | start,
|  | long | end
| ) |  |  |

Makes the position span from start to end, and positions the cursor after the selection. This call has no effect if the type of this input element isn't text or if it is not rendered. NOTE: this method is not part of the DOM, but a Mozilla extension

setSelectionStart | ( | self, |
|  | long | offset
| ) |  |  |

Move the beginning of the selection to the given offset in text This call has no effect if the type of this input element isn't text NOTE: this method is not part of the DOM, but a Mozilla extension

setSize | ( | self, |
|  | DOM.DOMString | a0
| ) |  |  |

see getSize

setSize | ( | self, |
|  | long | a0
| ) |  |  |

see getSize

setSrc | ( | self, |
|  | DOM.DOMString | a0
| ) |  |  |

see src

setTabIndex | ( | self, |
|  | long | a0
| ) |  |  |

see tabIndex

setType | ( | self, |
|  | DOM.DOMString | a0
| ) |  |  |

see type

setUseMap | ( | self, |
|  | DOM.DOMString | a0
| ) |  |  |

see useMap

setValue | ( | self, |
|  | DOM.DOMString | a0
| ) |  |  |

see value

DOM.DOMString size | ( |  | self ) |

Deprecated:

DOM.DOMString src | ( |  | self ) |

When the type attribute has the value "Image", this attribute specifies the location of the image to be used to decorate the graphical submit button. See the <a href="http://www.w3.org/TR/REC-html40/interact/forms.html#adef-src"> src attribute definition in HTML 4.0.

long tabIndex | ( |  | self ) |

Index that represents the element's position in the tabbing order. See the <a href="http://www.w3.org/TR/REC-html40/interact/forms.html#adef-tabindex"> tabindex attribute definition in HTML 4.0.

DOM.DOMString type | ( |  | self ) |

The type of control created. See the <a href="http://www.w3.org/TR/REC-html40/interact/forms.html#adef-type-INPUT"> type attribute definition in HTML 4.0.

DOM.DOMString useMap | ( |  | self ) |

Use client-side image map. See the <a href="http://www.w3.org/TR/REC-html40/struct/objects.html#adef-usemap"> usemap attribute definition in HTML 4.0.

DOM.DOMString value | ( |  | self ) |

The current form control value. Used for radio buttons and check boxes. See the <a href="http://www.w3.org/TR/REC-html40/interact/forms.html#adef-value-INPUT"> value attribute definition in HTML 4.0.