Please visit our sponsors !
The Input object
The Input object represents an INPUT element, which
can be of the following types: button, checkbox, file, hidden, image, password,
radio, reset, submit, or text.
Input Object Examples
Properties
Property |
Description |
accessKey |
Specifies a keyboard key to access the input element |
accept |
Specifies a list of content types a server processing this
form will handle correctly |
align |
Sets the alignment of a input element |
alt |
Sets or returns an alternate text to write if the
browser cannot show this input element |
checked |
Sets or returns a Boolean value that indicates whether a radio or checkbox is checked
or unchecked |
defaultValue |
Sets or returns the default value for an input element |
defaultChecked |
Sets the checked property to true (works with radio buttons and
checkboxes) |
disabled |
Sets or returns a Boolean value that indicates whether an
input element is disabled or enabled |
form |
Returns the form element to the input
element |
maxLength |
Sets or returns the maximum number of characters allowed in
a
text field |
name |
Sets or returns the name of the input
element |
readOnly |
Sets or returns a Boolean value that indicates whether an input element is read only
or writeable (works with text fields and password fields) |
size |
Sets or returns the size of a text field |
src |
Sets or returns the URL of the image on a submit
button (for type="image") |
tabIndex |
Sets or returns the input element's
position in the tab order |
type |
Returns the type of the input element |
useMap |
|
value |
Sets or returns the value of radio buttons and
checkboxes |
Methods
Method |
Description |
blur() |
The input element loses focus |
focus() |
The input element gets focus |
select() |
The input element is selected |
click() |
Makes a mouse click for these input elements: 'button',
'checkbox', 'radio', reset', and 'submit' |
Jump to: Top of Page
or HOME or
Printer friendly page
Search W3Schools:
What Others Say About Us
Does the world know about us? Check out these places:
Dogpile
Alta Vista
MSN
Google
Excite
Lycos
Yahoo
Ask Jeeves
We Help You For Free. You Can Help Us!
W3Schools is for training only. We do not warrant its correctness or its fitness for use.
The risk of using it remains entirely with the user. While using this site, you agree to have read and accepted our
terms of use and
privacy policy.
Copyright 1999-2002 by Refsnes Data. All Rights Reserved
|