Path: blob/aarch64-shenandoah-jdk8u272-b10/jaxp/src/org/w3c/dom/html/HTMLInputElement.java
86410 views
/*1* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.2*3* This code is free software; you can redistribute it and/or modify it4* under the terms of the GNU General Public License version 2 only, as5* published by the Free Software Foundation. Oracle designates this6* particular file as subject to the "Classpath" exception as provided7* by Oracle in the LICENSE file that accompanied this code.8*9* This code is distributed in the hope that it will be useful, but WITHOUT10* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or11* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License12* version 2 for more details (a copy is included in the LICENSE file that13* accompanied this code).14*15* You should have received a copy of the GNU General Public License version16* 2 along with this work; if not, write to the Free Software Foundation,17* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.18*19* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA20* or visit www.oracle.com if you need additional information or have any21* questions.22*/2324/*25* This file is available under and governed by the GNU General Public26* License version 2 only, as published by the Free Software Foundation.27* However, the following notice accompanied the original version of this28* file and, per its terms, should not be removed:29*30* Copyright (c) 2000 World Wide Web Consortium,31* (Massachusetts Institute of Technology, Institut National de32* Recherche en Informatique et en Automatique, Keio University). All33* Rights Reserved. This program is distributed under the W3C's Software34* Intellectual Property License. This program is distributed in the35* hope that it will be useful, but WITHOUT ANY WARRANTY; without even36* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR37* PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more38* details.39*/4041package org.w3c.dom.html;4243/**44* Form control. Note. Depending upon the environment in which the page is45* being viewed, the value property may be read-only for the file upload46* input type. For the "password" input type, the actual value returned may47* be masked to prevent unauthorized use. See the INPUT element definition48* in HTML 4.0.49* <p>See also the <a href='http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510'>Document Object Model (DOM) Level 2 Specification</a>.50*/51public interface HTMLInputElement extends HTMLElement {52/**53* When the <code>type</code> attribute of the element has the value54* "Text", "File" or "Password", this represents the HTML value attribute55* of the element. The value of this attribute does not change if the56* contents of the corresponding form control, in an interactive user57* agent, changes. Changing this attribute, however, resets the contents58* of the form control. See the value attribute definition in HTML 4.0.59*/60public String getDefaultValue();61public void setDefaultValue(String defaultValue);6263/**64* When <code>type</code> has the value "Radio" or "Checkbox", this65* represents the HTML checked attribute of the element. The value of66* this attribute does not change if the state of the corresponding form67* control, in an interactive user agent, changes. Changes to this68* attribute, however, resets the state of the form control. See the69* checked attribute definition in HTML 4.0.70*/71public boolean getDefaultChecked();72public void setDefaultChecked(boolean defaultChecked);7374/**75* Returns the <code>FORM</code> element containing this control. Returns76* <code>null</code> if this control is not within the context of a form.77*/78public HTMLFormElement getForm();7980/**81* A comma-separated list of content types that a server processing this82* form will handle correctly. See the accept attribute definition in83* HTML 4.0.84*/85public String getAccept();86public void setAccept(String accept);8788/**89* A single character access key to give access to the form control. See90* the accesskey attribute definition in HTML 4.0.91*/92public String getAccessKey();93public void setAccessKey(String accessKey);9495/**96* Aligns this object (vertically or horizontally) with respect to its97* surrounding text. See the align attribute definition in HTML 4.0.98* This attribute is deprecated in HTML 4.0.99*/100public String getAlign();101public void setAlign(String align);102103/**104* Alternate text for user agents not rendering the normal content of105* this element. See the alt attribute definition in HTML 4.0.106*/107public String getAlt();108public void setAlt(String alt);109110/**111* When the <code>type</code> attribute of the element has the value112* "Radio" or "Checkbox", this represents the current state of the form113* control, in an interactive user agent. Changes to this attribute114* change the state of the form control, but do not change the value of115* the HTML value attribute of the element.116*/117public boolean getChecked();118public void setChecked(boolean checked);119120/**121* The control is unavailable in this context. See the disabled122* attribute definition in HTML 4.0.123*/124public boolean getDisabled();125public void setDisabled(boolean disabled);126127/**128* Maximum number of characters for text fields, when <code>type</code>129* has the value "Text" or "Password". See the maxlength attribute130* definition in HTML 4.0.131*/132public int getMaxLength();133public void setMaxLength(int maxLength);134135/**136* Form control or object name when submitted with a form. See the name137* attribute definition in HTML 4.0.138*/139public String getName();140public void setName(String name);141142/**143* This control is read-only. Relevant only when <code>type</code> has144* the value "Text" or "Password". See the readonly attribute definition145* in HTML 4.0.146*/147public boolean getReadOnly();148public void setReadOnly(boolean readOnly);149150/**151* Size information. The precise meaning is specific to each type of152* field. See the size attribute definition in HTML 4.0.153*/154public String getSize();155public void setSize(String size);156157/**158* When the <code>type</code> attribute has the value "Image", this159* attribute specifies the location of the image to be used to decorate160* the graphical submit button. See the src attribute definition in HTML161* 4.0.162*/163public String getSrc();164public void setSrc(String src);165166/**167* Index that represents the element's position in the tabbing order. See168* the tabindex attribute definition in HTML 4.0.169*/170public int getTabIndex();171public void setTabIndex(int tabIndex);172173/**174* The type of control created. See the type attribute definition in175* HTML 4.0.176*/177public String getType();178179/**180* Use client-side image map. See the usemap attribute definition in181* HTML 4.0.182*/183public String getUseMap();184public void setUseMap(String useMap);185186/**187* When the <code>type</code> attribute of the element has the value188* "Text", "File" or "Password", this represents the current contents of189* the corresponding form control, in an interactive user agent. Changing190* this attribute changes the contents of the form control, but does not191* change the value of the HTML value attribute of the element. When the192* <code>type</code> attribute of the element has the value "Button",193* "Hidden", "Submit", "Reset", "Image", "Checkbox" or "Radio", this194* represents the HTML value attribute of the element. See the value195* attribute definition in HTML 4.0.196*/197public String getValue();198public void setValue(String value);199200/**201* Removes keyboard focus from this element.202*/203public void blur();204205/**206* Gives keyboard focus to this element.207*/208public void focus();209210/**211* Select the contents of the text area. For <code>INPUT</code> elements212* whose <code>type</code> attribute has one of the following values:213* "Text", "File", or "Password".214*/215public void select();216217/**218* Simulate a mouse-click. For <code>INPUT</code> elements whose219* <code>type</code> attribute has one of the following values: "Button",220* "Checkbox", "Radio", "Reset", or "Submit".221*/222public void click();223224}225226227