|
|
| Html Tag Input Variables |
INPUT - input element of a form
Description :
The INPUT tag defines a
form element that can receive user input. The TYPE attribute determines
the specific sort of form element to be created. TYPE can be one of the
following:
BUTTON places a button on an HTML form. Use JavaScript code to make the
button perform an action you define. See INPUT TYPE="BUTTON".
CHECKBOX places a toggle switch on an HTML form, letting the user set a
value on or off. See INPUT TYPE="CHECKBOX".
FILE places an element on an HTML form letting the user supply a file as
input. When the form is submitted, the content of the specified file is
sent to the server along with the other form data. See INPUT
TYPE="FILE".
HIDDEN specifies an invisible text element. A hidden element is used for
passing information to the server when a form is submitted. See INPUT
TYPE="HIDDEN".
IMAGE places an image, serving as a custom button, on an HTML form. When
a user clicks an image element, the form is submitted to the server. See
INPUT TYPE="IMAGE".
PASSWORD places a text input field on an HTML form. Each character typed
in the field is displayed as a character such as * or a black dot to
conceal the actual value. See INPUT TYPE="PASSWORD".
RADIO places a radio button on an HTML form. Radio buttons can be
grouped into sets, and only one button per set can be selected at a
time. See INPUT TYPE="RADIO".
RESET places a reset button on an HTML form. When a user clicks a reset
button, all elements in the form are reset to their default values. See
INPUT TYPE="RESET".
SUBMIT places a submit button on an HTML form. When a user presses a
submit button, the form is submitted. See INPUT TYPE="SUBMIT".
TEXT places a single line text input field on an HTML form. A text field
lets the user enter text. See INPUT TYPE="TEXT".
Description
INPUT TYPE="BUTTON"
A button apears in the form. You must specify JavaScript code as the
value of the ONCLICK attribute to determine what happens when the user
clicks the button.
Syntax
<INPUT TYPE="button" NAME="buttonName"
VALUE="buttonText" ONCLICK="JScode">
Attributes
NAME specifies the name of the button. The name does
not appear in the form.
VALUE specifies the text to be displayed in the button.
ONCLICK specifies JavaScript code to execute when a
user clicks the button.
--------------------------------------------------------------------------------
Top of page
Description :
INPUT TYPE="CHECKBOX"
A checkbox is a toggle that the user can select (switch
on) or deselect (switch off.)
Syntax
<INPUT TYPE="checkbox" CHECKED
NAME="name" ONCLICK="JScode" VALUE="checkboxValue"
>
Attributes
CHECKED specifies that the checkbox is displayed with a
tick mark to indicate that it is selected.
NAME specifies the name of the input element. This
value is the name portion of the name/value pair for this element that
is sent to the server when the form is submitted. The name is not
displayed on the form.
ONCLICK specifies JavaScript code to execute when a
user clicks the checkbox.
VALUE specifies the value to be returned to the server
if the checkbox is selected when the form is submitted. The default
value is ON, but you can specify a different value if you want. When the
form is submitted, only the name/value pairs for selected checkboxes are
sent to the invoked CGI program.
--------------------------------------------------------------------------------
Top of page
Description :
INPUT TYPE="FILE"
This places an element on an HTML form that lets the
user supply a file as input. When the form is submitted, the content of
the specified file is sent to the server as the value portion of the
name/value pair for this input element.
Syntax
<INPUT TYPE="file"
NAME="name" VALUE="filename">
Attributes
NAME specifies the name of the input element. This
value is used as the name portion of the name/value pair for this
element that is sent to the server when the form is submitted. The name
is not displayed on the form.
VALUE specifies the initial value of the input element.
--------------------------------------------------------------------------------
Top of page
Description :
INPUT TYPE="HIDDEN"
A hidden input element is an invisible element whose
main purpose is to contain data that the user does not enter. This data
gets sent to the invoked CGI program when the form is submitted. This
tag provides a mechanism for delivering a value to theCGI program
without the user having entered it, but note that it is not very hidden
because the user can discover it by viewing the document source.
Syntax
<INPUT TYPE="hidden"
NAME="name" VALUE="value">
Attributes
NAME specifies the name of the input element. This
value is used as the name portion of the name/value pair for this
element that is sent to the server when the form is submitted. The name
is not displayed on the form.
VALUE specifies the initial value of the input element.
--------------------------------------------------------------------------------
Top of page
Description :
INPUT TYPE="IMAGE"
This places an image, serving as a custom button, on an
HTML form. When a user clicks the image, the form is submitted to the
server.
Syntax
<INPUT TYPE="image" ALIGN="left|right|top|absmiddle|absbottom|texttop|middle|baseline|bottom"
NAME="name" SRC="location">
Attributes
ALIGN see alignment page.
NAME specifies the name of the input element. This
value is used as the name portion of the name/value pair for this
element that is sent to the invoked CGI program when the form is
submitted. The name is not displayed on the form.
SRC specifies the URL of the image to be displayed in
the document.
--------------------------------------------------------------------------------
Top of page
Description :
INPUT TYPE="PASSWORD"
A password element is a text input field in which each
character typed is displayed as a character such as * or a black dot to
conceal the actual value.
Syntax
<INPUT TYPE="password" MAXLENGTH="maxChar"
NAME="name" ONSELECT="JScode" SIZE="charLength"
VALUE="textValue">
Attributes
MAXLENGTH specifies the maximum number of characters a
password box can accept.
NAME specifies the name of the input element. This
value is used as the name portion of thename/value pair for this element
that is sent to the server when the form is submitted. The name is not
displayed on the form.
ONSELECT specifies JavaScript code to execute when a
user selects some of the text in the text element.
SIZE specifies the length of the input field, in
characters. The value should be an integer.
VALUE specifies the initial value of the password, if
any.
--------------------------------------------------------------------------------
Top of page
Description :
INPUT TYPE="RADIO"
A radio element is a radio button. A set of radio
buttons consists of multiple radio buttons that all have the same NAME
attribute. Only one radio button in the set can be selected at one time.
When the user selects a button in the set, all other buttons in the set
are deselected. If one radio button in a set has the CHECKED attribute,
that one is selected when the set is first laid out on the window.
Syntax
<INPUT TYPE="radio" CHECKED
NAME="name" ONCLICK="JScode" VALUE="buttonValue">
Attributes
CHECKED indicates that the radio button is selected.
NAME specifies the name of the input element. This
value is used as the name portion of the name/value pair for this
element that is sent to the invoked CGI program when the form is
submitted. The name is not displayed on the form. All radio buttons that
have the same name constitute a radio group; only one radio button of a
group can be set at one time.
ONCLICK specifies JavaScript code to execute when a
user clicks the radio button.
VALUE specifies the value that is returned to the
server when the radio button is selected and the form is submitted. Only
name/value pairs for radio buttons that are selected are sent to the
invoked CGI program. The value defaults to ON.
--------------------------------------------------------------------------------
Top of page
Description :
INPUT TYPE="RESET"
When a user presses a reset button, all elements in the
form are reset to their default values.
Syntax
<INPUT TYPE="reset"
NAME="name" ONCLICK="JScode"
VALUE="label">
Attributes
NAME specifies the name of the input element.
ONCLICK specifies JavaScript code to execute when a
user clicks the button.
VALUE specifies the text to display on the reset
button.
--------------------------------------------------------------------------------
Top of page
Description :
INPUT TYPE="SUBMIT"
When a user clicks a submit button, the form is submitted, which means
that the ACTION specified for the form is invoked.
Syntax
<INPUT TYPE="submit"
NAME="name" VALUE="label">
Attributes
NAME specifies the name of the input element. The name
is not displayed on the form.
VALUE specifies the text to display on the submit
button.
--------------------------------------------------------------------------------
Top of page
Description :
INPUT TYPE="TEXT"
A text element is a single line text input field in which the user can
enter text.
Syntax
<INPUT TYPE="text" MAXLENGTH="maxChars"
NAME="name" ONBLUR="JScode" ONCHANGE="JScode"
ONFOCUS="JScode" ONSELECT="JScode" SIZE="lengthChars"
VALUE="text">
Attributes
MAXLENGTH specifies the maximum number of characters a
text box can accept.
NAME specifies the name of the input element. This
value is used as the name portion of the name/value pair for this
element that is sent to the invoked CGI program when the form is
submitted. The name is not displayed on the form.
ONBLUR specifies JavaScript code to execute when the
text element loses keyboard focus.
ONCHANGE specifies JavaScript code to execute when the
text element loses focus and its value has been modified.
ONFOCUS specifies JavaScript code to execute when a
user clicks the text element.
ONSELECT specifies JavaScript code to execute when a
user selects some of the text in the text element.
SIZE specifies the length of the input field, in
characters.
VALUE specifies the initial value of the text element.
|
|