Class HTMLInputElement

Class HTMLInputElement

Namespace: Aspose.Html
Assembly: Aspose.HTML.dll (25.2.0)

Form control.Depending upon the environment in which 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 INPUT element definition in [HTML 4.01].

See also the Document object Model (DOM) Level 2 HTML Specification.

[DOMName("HTMLInputElement")]
[DOMObject]
[ComVisible(true)]
public class HTMLInputElement : HTMLElement, INotifyPropertyChanged, IEventTarget, IDisposable, IXPathNSResolver, IParentNode, IElementTraversal, IChildNode, IElementCSSInlineStyle, IGlobalEventHandlers

Inheritance

objectDOMObjectEventTargetNodeElementHTMLElementHTMLInputElement

Implements

INotifyPropertyChanged, IEventTarget, IDisposable, IXPathNSResolver, IParentNode, IElementTraversal, IChildNode, IElementCSSInlineStyle, IGlobalEventHandlers

Inherited Members

HTMLElement.Id, HTMLElement.Title, HTMLElement.Lang, HTMLElement.Dir, HTMLElement.ClassName, HTMLElement.Style, HTMLElement.OnAbort, HTMLElement.OnBlur, HTMLElement.OnCancel, HTMLElement.OnCanplay, HTMLElement.OnCanPlayThrough, HTMLElement.OnChange, HTMLElement.OnClick, HTMLElement.OnCueChange, HTMLElement.OnDblClick, HTMLElement.OnDurationChange, HTMLElement.OnEmptied, HTMLElement.OnEnded, HTMLElement.OnError, HTMLElement.OnFocus, HTMLElement.OnInput, HTMLElement.OnInvalid, HTMLElement.OnKeyDown, HTMLElement.OnKeyPress, HTMLElement.OnKeyUp, HTMLElement.OnLoad, HTMLElement.OnLoadedData, HTMLElement.OnLoadedMetadata, HTMLElement.OnLoadStart, HTMLElement.OnMouseDown, HTMLElement.OnMouseEnter, HTMLElement.OnMouseLeave, HTMLElement.OnMouseMove, HTMLElement.OnMouseOut, HTMLElement.OnMouseOver, HTMLElement.OnMouseUp, HTMLElement.OnMouseWheel, HTMLElement.OnPause, HTMLElement.OnPlay, HTMLElement.OnPlaying, HTMLElement.OnProgress, HTMLElement.OnRateChange, HTMLElement.OnReset, HTMLElement.OnResize, HTMLElement.OnScroll, HTMLElement.OnSeeked, HTMLElement.OnSeeking, HTMLElement.OnSelect, HTMLElement.OnShow, HTMLElement.OnStalled, HTMLElement.OnSubmit, HTMLElement.OnSuspend, HTMLElement.OnTimeUpdate, HTMLElement.OnToggle, HTMLElement.OnVolumeChange, HTMLElement.OnWaiting, Element.GetAttributeNames(), Element.HasAttributes(), Element.GetAttribute(string), Element.GetAttributeNS(string, string), Element.SetAttribute(string, string), Element.SetAttributeNS(string, string, string), Element.RemoveAttribute(string), Element.RemoveAttributeNS(string, string), Element.HasAttribute(string), Element.HasAttributeNS(string, string), Element.ToggleAttribute(string), Element.ToggleAttribute(string, bool), Element.GetAttributeNode(string), Element.SetAttributeNode(Attr), Element.RemoveAttributeNode(Attr), Element.GetAttributeNodeNS(string, string), Element.SetAttributeNodeNS(Attr), Element.GetElementsByTagName(string), Element.GetElementsByTagNameNS(string, string), Element.Remove(), Element.QuerySelectorAll(string), Element.QuerySelector(string), Element.AttachShadow(ShadowRootMode), Element.GetElementsByClassName(string), Element.Dispose(bool), Element.ClassList, Element.LocalName, Element.NamespaceURI, Element.Prefix, Element.NodeName, Element.NodeType, Element.TagName, Element.Id, Element.ClassName, Element.TextContent, Element.Attributes, Element.FirstElementChild, Element.LastElementChild, Element.PreviousElementSibling, Element.NextElementSibling, Element.ChildElementCount, Element.Children, Element.InnerHTML, Element.OuterHTML, Element.ShadowRoot, Node.ELEMENT_NODE, Node.ATTRIBUTE_NODE, Node.TEXT_NODE, Node.CDATA_SECTION_NODE, Node.ENTITY_REFERENCE_NODE, Node.ENTITY_NODE, Node.PROCESSING_INSTRUCTION_NODE, Node.COMMENT_NODE, Node.DOCUMENT_NODE, Node.DOCUMENT_TYPE_NODE, Node.DOCUMENT_FRAGMENT_NODE, Node.NOTATION_NODE, Node.HasChildNodes(), Node.Normalize(), Node.CloneNode(), Node.CloneNode(bool), Node.IsEqualNode(Node), Node.IsSameNode(Node), Node.LookupPrefix(string), Node.LookupNamespaceURI(string), Node.IsDefaultNamespace(string), Node.InsertBefore(Node, Node), Node.ReplaceChild(Node, Node), Node.RemoveChild(Node), Node.AppendChild(Node), Node.Dispose(bool), Node.ToString(), Node.NodeType, Node.LocalName, Node.NamespaceURI, Node.Prefix, Node.NodeName, Node.BaseURI, Node.OwnerDocument, Node.ParentNode, Node.ParentElement, Node.ChildNodes, Node.FirstChild, Node.LastChild, Node.PreviousSibling, Node.NextSibling, Node.NodeValue, Node.TextContent, EventTarget.AddEventListener(string, DOMEventHandler, bool), EventTarget.AddEventListener(string, IEventListener), EventTarget.AddEventListener(string, IEventListener, bool), EventTarget.RemoveEventListener(string, DOMEventHandler, bool), EventTarget.RemoveEventListener(string, IEventListener), EventTarget.RemoveEventListener(string, IEventListener, bool), EventTarget.DispatchEvent(Event), EventTarget.Dispose(), EventTarget.Dispose(bool), DOMObject.GetPlatformType(), object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Properties

Accept

A comma-separated list of content types that a server processing this form will handle correctly. See the accept attribute definition in HTML 4.01.

[DOMName("accept")]
public string Accept { get; set; }

Property Value

string

AccessKey

A single character access key to give access to the form control. See the accesskey attribute definition in HTML 4.01.

[DOMName("accessKey")]
public string AccessKey { get; set; }

Property Value

string

Align

Aligns this object (vertically or horizontally) with respect to its surrounding text. See the align attribute definition in HTML 4.01. This attribute is deprecated in HTML 4.01.

[DOMName("align")]
public string Align { get; set; }

Property Value

string

Alt

Alternate text for user agents not rendering the normal content of this element. See the alt attribute definition in HTML 4.01.

[DOMName("alt")]
public string Alt { get; set; }

Property Value

string

Checked

When the type attribute of the element has the value “radio” or “checkbox”, this represents the current state of the form control, in an interactive user agent. Changes to this attribute change the state of the form control, but do not change the value of the HTML checked attribute of the INPUT element.During the handling of a click event on an input element with a type attribute that has the value “radio” or “checkbox”, some implementations may change the value of this property before the event is being dispatched in the document. If the default action of the event is canceled, the value of the property may be changed back to its original value. This means that the value of this property during the handling of click events is implementation dependent.

[DOMName("checked")]
public bool Checked { get; set; }

Property Value

bool

DefaultChecked

When type has the value “radio” or “checkbox”, this represents the HTML checked attribute of the element. The value of this attribute does not change if the state of the corresponding form control, in an interactive user agent, changes. See the checked attribute definition in HTML 4.01.

[DOMName("defaultChecked")]
public bool DefaultChecked { get; set; }

Property Value

bool

DefaultValue

When the type attribute of the element has the value “text”, “file” or “password”, this represents the HTML value attribute of the element. The value of this attribute does not change if the contents of the corresponding form control, in an interactive user agent, changes. See the value attribute definition in HTML 4.01.

[DOMName("defaultValue")]
public string DefaultValue { get; set; }

Property Value

string

Disabled

The control is unavailable in this context. See the disabled attribute definition in HTML 4.01.

[DOMName("disabled")]
public bool Disabled { get; set; }

Property Value

bool

Files

The files IDL attribute allows scripts to access the element’s selected files. On getting, if the IDL attribute applies, it must return a FileList object that represents the current selected files. The same object must be returned until the list of selected files changes. If the IDL attribute does not apply, then it must instead return null. [FILEAPI]

[DOMName("files")]
public IFileList Files { get; }

Property Value

IFileList

Form

Returns the FORM element containing this control. Returns null if this control is not within the context of a form.

[DOMName("form")]
[DOMNullable]
public HTMLFormElement Form { get; set; }

Property Value

HTMLFormElement

List

The list attribute is used to identify an element that lists predefined options suggested to the user. If present, its value must be the ID of a datalist element in the same document.

[DOMName("list")]
public string List { get; set; }

Property Value

string

MaxLength

Maximum number of characters for text fields, when type has the value “text” or “password”. See the maxlength attribute definition in HTML 4.01.

[DOMName("maxLength")]
public int MaxLength { get; set; }

Property Value

int

Name

Form control or object name when submitted with a form. See the name attribute definition in HTML 4.01.

[DOMName("name")]
public string Name { get; set; }

Property Value

string

ReadOnly

This control is read-only. Relevant only when type has the value “text” or “password”. See the readonly attribute definition in HTML 4.01.

[DOMName("readOnly")]
public bool ReadOnly { get; set; }

Property Value

bool

Size

Size information. The precise meaning is specific to each type of field. See the size attribute definition in HTML 4.01. @version DOM Level 2

[DOMName("size")]
public int Size { get; set; }

Property Value

int

Src

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 src attribute definition in HTML 4.01.

[DOMName("src")]
public string Src { get; set; }

Property Value

string

TabIndex

Index that represents the element’s position in the tabbing order. See the tabindex attribute definition in HTML 4.01.

[DOMName("tabIndex")]
public int TabIndex { get; set; }

Property Value

int

Type

The type of control created (all lower case). See the type attribute definition in HTML 4.01. @version DOM Level 2

[DOMName("type")]
public string Type { get; set; }

Property Value

string

UseMap

Use client-side image map. See the usemap attribute definition in HTML 4.01.

[DOMName("useMap")]
public string UseMap { get; set; }

Property Value

string

Value

When the type attribute of the element has the value “text”, “file” or “password”, this represents the current contents of the corresponding form control, in an interactive user agent. Changing this attribute changes the contents of the form control, but does not change the value of the HTML value attribute of the element. When the type attribute of the element has the value “button”, “hidden”, “submit”, “reset”, “image”, “checkbox” or “radio”, this represents the HTML value attribute of the element. See the value attribute definition in HTML 4.01.

[DOMName("value")]
public string Value { get; set; }

Property Value

string