www.fgks.org   »   [go: up one dir, main page]

INPUT Element | input Object

Creates a variety of form input controls.

Members Table

The following table lists the members exposed by the input object.

Attributes/Properties
AttributePropertyDescription
ACCEPTaccept Sets or retrieves a comma-separated list of content types.
ALIGNalign Sets or retrieves how the object is aligned with adjacent text.
ALTalt Sets or retrieves a text alternative to the graphic.
complete Retrieves whether the object is fully loaded.
DYNSRCdynsrc Sets or retrieves the address of a video clip or VRML world to display in the window.
HSPACEhspace Sets or retrieves the horizontal margin for the object.
LOOPloop Sets or retrieves the number of times a sound or video clip will loop when activated.
LOWSRClowsrc Sets or retrieves a lower resolution image to display.
startstart Sets or retrieves when a video clip file should begin playing.
USEMAPuseMap Sets or retrieves the URL, often with a bookmark extension (#name), to use as a client-side image map.
VALUEvalue Sets or retrieves the default or selected value of the control.
VSPACEvspace Sets or retrieves the vertical margin for the object.
Behaviors
BehaviorDescription
mask Grants a masked edit behavior to DHTML Objects.
Styles
Style attributeStyle propertyDescription
:first-child New for Windows Internet Explorer 7 :first-child Applies one or more styles to any element that is the first child of its parent.
:hover:hover Sets the style of an element when the user hovers the mouse pointer over the element.
layout-flowlayoutFlow Sets or retrieves the direction and flow of the content in the object.
text-underline-positiontextUnderlinePosition Sets or retrieves the position of the underline decoration that is set through the textDecoration property of the object.
word-wrapwordWrap Sets or retrieves whether to break words when the content exceeds the boundaries of its container.
writing-modewritingMode Sets or retrieves the direction and flow of the content in the object.
zoomzoom Sets or retrieves the magnification scale of the object.

Remarks

The TYPE attribute for the INPUT element is used to specify one of the following form input controls:

buttoncheckboxfilehiddenimage
passwordradioresetsubmittext

This element is an inline element.

This element does not require a closing tag.

Example

This example uses the INPUT element to create different types of input controls.

<FORM ACTION="http://intranet/survey" METHOD=POST>
<P>Name</P>
<BR><INPUT NAME="CONTROL1" TYPE=TEXT VALUE="Your Name">
<P>Password</P>
<BR><INPUT TYPE="PASSWORD" NAME="CONTROL2">
<P>Color</P>
<BR><INPUT TYPE="RADIO" NAME="CONTROL3" VALUE="0" CHECKED>Red
<INPUT TYPE="RADIO" NAME="CONTROL3" VALUE="1">Green
<INPUT TYPE="RADIO" NAME="CONTROL3" VALUE="2">Blue
<P>Comments</P>
<BR><INPUT TYPE="TEXT" NAME="CONTROL4" SIZE="20,5" MAXLENGTH="250">
<P><INPUT NAME="CONTROL5" TYPE=CHECKBOX CHECKED>Send receipt</P>
<P><INPUT TYPE="SUBMIT" VALUE="OK"><INPUT TYPE="RESET" VALUE="Reset"></P>
</FORM>

Standards Information

This object is defined in HTML 3.2 World Wide Web link and is defined in World Wide Web Consortium (W3C) Document Object Model (DOM) Level 1 World Wide Web link.

See Also

button, select, textArea


MSDN Library
Web Development
HTML and CSS
HTML and DHTML Reference
Objects
input