HOME

DHTML Tutorial
DHTML HOME
DHTML Intro
DHTML CSS
DHTML DOM
DHTML Events

DHTML Examples
DHTML Examples

DHTML DOM
DOM window
DOM navigator
DOM event
DOM collection
DOM document
DOM form
DOM input
DOM select
DOM option
DOM textarea
DOM table
DOM tablerow
DOM tablecell
DOM anchor
DOM image
DOM frameset
DOM frame
DOM iframe

DOM Examples
DOM Examples

Please visit our sponsors !

The Input object

previous next

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

Example IE
5.5
NN
4.7
NN
6.2
Check and uncheck a checkbox X X X
Disable and enable a field X   X
Set maximum number of characters X   X
Make a field read only X   X
Change the size of a field X   X
Set and return values from radio buttons X X X
Set focus on a field X X X
Select the field's text X X X


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'


previous next

Jump to: Top of Page or HOME or Printer Friendly 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


Validate How we converted to XHTML Validate

IISCart
ASP Ecommerce & Shopping Cart


Your own Web Site?

Read W3Schools
Hosting Tutorial



$15 Domain Name
Registration
Save $20 / year!



Advertise
at W3Schools

Only 0.5 CPM



SELECTED LINKS

University Online
Master Degree
Bachelor Degree


Web Software

The Future of
Web Development


Jobs and Careers

Web Security
Web Statistics
Web Standards


PARTNERS

W3Schools
TopXML
VisualBuilder
XMLPitstop
DevelopersDex
DevGuru
Programmers Heaven
The Code Project
Tek Tips Forum
ZVON.ORG
TopXML Search