Javscript Input Button Object
The Button object represents a button in an HTML form. For each instance of an <input type="button"> tag in an HTML form, a Button object is created.
You can access a Button object by indexing the elements array (by number or name) of the corresponding form or by using getElementById().
IE: Internet Explorer, F: Firefox, N: Netscape, W3C: World Wide Web Consortium (Internet Standard).
Javscript Input Button Object Properties
Property |
Description |
IE |
F |
N |
W3C |
accessKey |
Sets or returns the keyboard key to access the button |
5 |
|
|
Yes |
disabled |
Sets or returns whether or not the button should be disabled |
5 |
1 |
|
Yes |
form |
Returns a reference to the form that contains the button |
3 |
1 |
2 |
Yes |
id |
Sets or returns the id of the button |
4 |
1 |
|
No |
name |
Sets or returns the name of the button |
3 |
1 |
2 |
Yes |
tabIndex |
Sets or returns the index that defines the tab order for the button |
5 |
|
|
Yes |
type |
Returns the type of the form element. For a Button object it will be "button" |
4 |
1 |
3 |
Yes |
value |
Sets or returns the text that is displayed on the button |
3 |
1 |
2 |
Yes |
Javscript Input Button Object Methods
Method |
Description |
IE |
F |
N |
W3C |
blur() |
Removes focus from the button |
3 |
1 |
2 |
|
click() |
Simulates a mouse-click on the button |
3 |
1 |
2 |
|
focus() |
Gives focus to the button |
3 |
1 |
2 |
|
Javscript Input Button Objects Events
Syntax: object.event_name="someJavaScriptCode"
Event |
Description |
IE |
F |
N |
W3C |
onBlur |
Executes some code when the button loses focus |
3 |
1 |
2 |
|
onClick |
Executes some code when the button is clicked |
3 |
1 |
2 |
|
onFocus |
Executes some code when the button gets focus |
3 |
1 |
2 |
|
onMouseDown |
Executes some code when a mouse button is pressed |
4 |
1 |
4 |
|
onMouseUp |
Executes some code when a mouse button is released |
4 |
1 |
4 |
|
Javscript Input Checkbox Object
The Checkbox object represents a checkbox in an HTML form. For each instance of an <input type="checkbox"> tag in an HTML form, a Checkbox object is created.
You can access a Checkbox object by indexing the elements array (by number or name) of the corresponding form or by using getElementById().
IE: Internet Explorer, F: Firefox, N: Netscape, W3C: World Wide Web Consortium (Internet Standard).
Javscript Input Checkbox Object Properties
Property |
Description |
IE |
F |
N |
W3C |
accept |
Sets or returns a list of content types, which the server processing this form will handle correctly |
- |
|
|
Yes |
accessKey |
Sets or returns the keyboard key to access the checkbox |
4 |
|
|
Yes |
align |
Sets or returns the alignment of the checkbox according to the surrounding text |
- |
|
|
Yes |
alt |
Sets or returns an alternate text to display if the browser does not support checkboxes |
- |
|
|
Yes |
checked |
Sets or returns whether or not the checkbox is checked |
3 |
1 |
2 |
Yes |
defaultChecked |
Sets or returns the default value of the checked attribute (true if checked by default and false if not) |
3 |
1 |
2 |
Yes |
disabled |
Sets or returns whether or not the checkbox should be disabled |
3 |
1 |
|
Yes |
form |
Returns a reference to the form that contains the checkbox |
3 |
1 |
2 |
Yes |
id |
Sets or returns the id of the checkbox (In IE 4 this property is read-only) |
4 |
1 |
|
No |
name |
Sets or returns the name of the checkbox |
3 |
1 |
2 |
Yes |
tabIndex |
Sets or returns the index that defines the tab order for the checkbox |
4 |
|
|
Yes |
type |
Returns the type of the form element. For a checkbox it will be "checkbox" |
4 |
1 |
3 |
Yes |
value |
Sets or returns the value of the value attribute of the checkbox |
3 |
1 |
2 |
Yes |
Javscript Input Checkbox Object Methods
Method |
Description |
IE |
F |
N |
W3C |
blur() |
Removes focus from the checkbox |
3 |
1 |
2 |
Yes |
click() |
Simulates a mouse-click in the checkbox |
3 |
1 |
2 |
Yes |
focus() |
Gives focus to the checkbox |
3 |
1 |
2 |
Yes |
Javscript Input Checkbox Object Events
Syntax: object.event_name="someJavaScriptCode"
Event |
Description |
IE |
F |
N |
W3C |
onBlur |
Executes some code when the checkbox loses focus |
3 |
1 |
2 |
|
onClick |
Executes some code when the checkbox is clicked |
3 |
1 |
2 |
|
onFocus |
Executes some code when the checkbox gets focus |
3 |
1 |
2 |
|
onMouseDown |
Executes some code when a mouse button is pressed |
4 |
1 |
4 |
|
onMouseUp |
Executes some code when a mouse button is released |
4 |
1 |
4 |
|
Javscript Input FileUpload Object
For each instance of an <input type="file"> tag in an HTML form, a FileUpload object is created.
You can access a FileUpload object by indexing the elements array (by number or name) of the corresponding form or by using getElementById().
IE: Internet Explorer, F: Firefox, N: Netscape, W3C: World Wide Web Consortium (Internet Standard).
Javscript Input FileUpload Object Properties
Property |
Description |
IE |
F |
N |
W3C |
accept |
Sets or returns a list of content types, which the server processing this form will handle correctly |
- |
|
|
Yes |
accessKey |
Sets or returns the keyboard key to access the FileUpload object |
4 |
|
|
Yes |
align |
Sets or returns the alignment of the FileUpload object according to the surrounding text |
- |
|
|
Yes |
alt |
Sets or returns an alternate text to display if the browser does not support <input type="file"> |
- |
|
|
Yes |
defaultValue |
Sets or returns the initial value of the FileUpload object |
4 |
1 |
3 |
Yes |
disabled |
Sets or returns whether or not the FileUpload object should be disabled |
4 |
|
|
Yes |
form |
Returns a reference to the form that contains the FileUpload object |
4 |
1 |
3 |
Yes |
id |
Sets or returns the id of the FileUpload object (In IE 4 this property is read-only) |
4 |
1 |
|
No |
name |
Sets or returns the name of the FileUpload object |
4 |
1 |
3 |
Yes |
tabIndex |
Sets or returns the index that defines the tab order for the FileUpload object |
4 |
|
|
Yes |
type |
Returns the type of the form element. For a FileUpload object it will be "file" |
4 |
1 |
3 |
Yes |
value |
Returns the file name of the FileUpload object after the text is set by user input |
4 |
1 |
3 |
Yes |
Javscript Input FileUpload Object Methods
Method |
Description |
IE |
F |
N |
W3C |
blur() |
Removes focus from the FileUpload object |
4 |
1 |
3 |
Yes |
click() |
Simulates a mouse-click on the FileUpload object |
4 |
|
|
No |
focus() |
Gives focus to the FileUpload object |
4 |
1 |
3 |
Yes |
select() |
Selects the FileUpload object |
4 |
|
|
Yes |
Javscript Input FileUpload Object Events
Syntax: object.event_name="someJavaScriptCode"
Event |
Description |
IE |
F |
N |
W3C |
onBlur |
Executes some code when the FileUpload object loses focus |
4 |
1 |
3 |
|
onClick |
Executes some code when the FileUpload object gets a mouse click |
4 |
1 |
3 |
|
onFocus |
Executes some code when the FileUpload object gets focus |
4 |
1 |
3 |
|
onSelectStart |
Executes some code when the FileUpload object gets selected |
4 |
|
|
|
Javscript Input Hidden Object
The Hidden object represents a hidden field in an HTML form. For each instance of an <input type="hidden"> tag in an HTML form, a Hidden object is created.
You can access a Hidden object by indexing the elements array (by number or name) of the corresponding form or by using getElementById().
IE: Internet Explorer, F: Firefox, N: Netscape, W3C: World Wide Web Consortium (Internet Standard).
Javscript Input Hidden Object Properties
Property |
Description |
IE |
F |
N |
W3C |
defaultValue |
Sets or returns the initial value of the hidden field |
3 |
1 |
2 |
Yes |
form |
Returns a reference to the hidden field's parent form |
3 |
1 |
2 |
Yes |
id |
Sets or returns the id of the hidden field (In IE 4 this property is read-only) |
4 |
1 |
|
No |
name |
Sets or returns the name of the hidden field |
3 |
1 |
2 |
Yes |
type |
Returns the type of the form element. For a hidden object it will always be "hidden" |
4 |
1 |
3 |
Yes |
value |
Sets or returns the value of the value attribute of the hidden field |
3 |
1 |
2 |
Yes |
Javscript Input Password Object
The Password object represents a password field in an HTML form. For each instance of an HTML <input type="password"> tag on a form, a Password object is created.
You can access a Password object by indexing the elements array (by number or name) of the corresponding form or by using getElementById().
IE: Internet Explorer, F: Firefox, N: Netscape, W3C: World Wide Web Consortium (Internet Standard).
Javscript Input Password Object Properties
Property |
Description |
IE |
F |
N |
W3C |
accept |
Sets or returns a list of content types, which the server processing this form will handle correctly |
- |
|
|
Yes |
accesskey |
Sets or returns the keyboard key to access the password field |
4 |
|
|
Yes |
defaultValue |
Sets or returns the initial value of the password field |
3 |
1 |
2 |
Yes |
disabled |
Sets or returns whether or not the password field should be disabled |
5 |
1 |
6 |
Yes |
form |
Returns a reference to the password field's parent form |
3 |
1 |
2 |
Yes |
id |
Sets or returns the id of the password field (In IE 4 this property is read-only) |
4 |
1 |
|
No |
maxLength |
Sets or returns the maximum number of characters the user can enter in the password field |
4 |
1 |
6 |
Yes |
name |
Sets or returns the name of the password field |
3 |
1 |
2 |
Yes |
readOnly |
Sets or returns whether the content of the password field is read-only |
4 |
1 |
6 |
Yes |
size |
Sets or returns the size of the password field |
3 |
1 |
6 |
Yes |
tabIndex |
Sets or returns the index that defines the tab order for the password field |
4 |
|
|
Yes |
type |
The type of the form element. For a password object it will always be "password" |
3 |
1 |
3 |
Yes |
value |
Sets or returns the value of the value attribute of the password field |
3 |
1 |
2 |
Yes |
Javscript Input Password Object Methods
Method |
Description |
IE |
F |
N |
W3C |
blur() |
Removes focus from the password field |
4 |
1 |
2 |
Yes |
click() |
Simulates a mouse-click on the password field |
4 |
1 |
|
No |
focus() |
Sets focus on the password field |
3 |
1 |
2 |
Yes |
select() |
Selects and highlights the entire text that is in the password field |
4 |
1 |
2 |
Yes |
Javscript Input Password Object Events
Syntax: object.event_name="someJavaScriptCode"
Event |
Description |
IE |
F |
N |
W3C |
onBlur |
Executes some code when the password field loses focus |
4 |
1 |
2 |
|
onClick |
Executes some code when the user clicks in the password field |
4 |
|
|
|
onFocus |
Executes some code when the password field gets focus |
3 |
1 |
2 |
|
onKeyDown |
Executes some code when a key is pressed down in the password field |
4 |
1 |
4 |
|
onKeyPress |
Executes some code when an alphanumeric key is pressed in the password field |
4 |
1 |
4 |
|
onKeyUp |
Executes some code when a key is released in the password field |
4 |
1 |
4 |
|
onSelectStart |
Executes some code when some text in the password field is selected |
4 |
|
|
|
Javscript Input Radio Object
The Radio object represents a radio button in an HTML form. For each instance of an <input type="radio"> tag in an HTML form, a Radio object is created.
You can access a Radio object by indexing the elements array (by number or name) of the corresponding form or by using getElementById().
IE: Internet Explorer, F: Firefox, N: Netscape, W3C: World Wide Web Consortium (Internet Standard).
Javscript Input Radio Object Properties
Property |
Description |
IE |
F |
N |
W3C |
accept |
Sets or returns a list of content types, which the server processing this form will handle correctly |
- |
|
|
Yes |
accesskey |
Sets or returns the keyboard key to access the radio button |
4 |
|
|
Yes |
align |
Sets or returns the alignment of the radio button according to the surrounding text |
- |
|
|
Yes |
alt |
Sets or returns an alternate text to display if the browser does not support radio buttons |
- |
|
|
Yes |
checked |
Sets or returns the current state of the radio button (true if selected and false if not selected) |
3 |
1 |
2 |
Yes |
defaultChecked |
Sets or returns the default value of the checked attribute (true if checked by default and false if not) |
3 |
1 |
2 |
Yes |
disabled |
Sets or returns whether or not the radio button should be disabled |
5 |
1 |
|
Yes |
form |
Returns a reference to the radio button's parent form |
3 |
1 |
2 |
Yes |
id |
Sets or returns the id of the radio button (In IE 4 this property is read-only) |
4 |
1 |
|
No |
name |
Sets or returns the name of the radio button |
3 |
1 |
2 |
Yes |
size |
Sets or returns the size of the radio button |
3 |
|
|
Yes |
tabIndex |
Sets or returns the tab order for the radio button |
4 |
|
|
Yes |
type |
The type of the form element. For a radio object it will always be "radio" |
3 |
1 |
3 |
Yes |
value |
Sets or returns the value of the value attribute of the radio button |
3 |
1 |
2 |
Yes |
Javscript Input Radio Object Methods
Method |
Description |
IE |
F |
N |
W3C |
blur() |
Removes focus from the radio button |
4 |
1 |
2 |
Yes |
click() |
Simulates a mouse-click on the radio button |
4 |
1 |
|
Yes |
focus() |
Sets focus on the radio button |
3 |
1 |
2 |
Yes |
select() |
Selects the radio button |
4 |
1 |
2 |
No |
Javscript Input Radio Object Events
Syntax: object.event_name="someJavaScriptCode"
Event |
Description |
IE |
F |
N |
W3C |
onBlur |
Executes some code when the radio button loses focus |
4 |
1 |
2 |
|
onClick |
Executes some code when the user clicks on the radio button |
4 |
|
|
|
onFocus |
Executes some code when the radio button gets focus |
3 |
1 |
2 |
|
onSelectStart |
Executes some code when the radio button is selected |
4 |
|
|
|
Javscript Input Reset Object Properties
Property |
Description |
IE |
F |
N |
W3C |
accept |
Sets or returns a list of content types, which the server processing this form will handle correctly |
- |
|
|
Yes |
accesskey |
Sets or returns the keyboard key to access the reset button |
4 |
|
|
Yes |
align |
Sets or returns the alignment of the reset button according to the surrounding text |
- |
|
|
Yes |
alt |
Sets or returns an alternate text to display if the browser does not support reset buttons |
- |
|
|
Yes |
defaultValue |
Sets or returns the default value of the reset button |
3 |
|
|
Yes |
disabled |
Sets or returns whether or not the reset button should be disabled |
5 |
1 |
|
Yes |
form |
Returns a reference to the reset button's parent form |
3 |
1 |
2 |
Yes |
id |
Sets or returns the id of the reset button (In IE 4 this property is read-only) |
4 |
1 |
|
No |
name |
Sets or returns the name of the reset button |
3 |
1 |
2 |
Yes |
size |
Sets or returns the size of the reset button |
3 |
|
|
Yes |
tabIndex |
Sets or returns the tab order for the reset button |
4 |
|
|
Yes |
type |
Returns the type of the form element. For a reset object it will always be "reset" |
3 |
1 |
3 |
Yes |
value |
Sets or returns the value of the value attribute of the reset button |
3 |
1 |
2 |
Yes |
Javscript Input Reset Object Methods
Method |
Description |
IE |
F |
N |
W3C |
blur() |
Removes focus from the reset button |
4 |
1 |
2 |
Yes |
click() |
Simulates a mouse-click on the reset button |
4 |
1 |
|
Yes |
focus() |
Sets focus on the reset button |
3 |
1 |
2 |
Yes |
select() |
Selects the reset button |
4 |
1 |
2 |
No |
Javscript Input Reset Object Events
Syntax: object.event_name="someJavaScriptCode"
Event |
Description |
IE |
F |
N |
W3C |
onBlur |
Executes some code when the reset button loses focus |
4 |
1 |
2 |
|
onClick |
Executes some code when the user clicks on the reset button |
4 |
|
|
|
onFocus |
Executes some code when the reset button gets focus |
3 |
1 |
2 |
|
onSelectStart |
Executes some code when the reset button is selected |
4 |
|
|
|
Javscript Input Submit Object
The Submit object represents a submit button in an HTML form. For each instance of an <input type="submit"> tag in an HTML form, a Submit object is created.
You can access a Submit object by indexing the elements array (by number or name) of the corresponding form or by using getElementById().
IE: Internet Explorer, F: Firefox, N: Netscape, W3C: World Wide Web Consortium (Internet Standard).
Javscript Input Submit Object Properties
Property |
Description |
IE |
F |
N |
W3C |
accept |
Sets or returns a list of content types, which the server processing this form will handle correctly |
- |
|
|
Yes |
accessKey |
Sets or returns the keyboard key to access the submit button |
4 |
|
|
Yes |
align |
Sets or returns the alignment of the submit button according to the surrounding text |
- |
|
|
Yes |
alt |
Sets or returns an alternate text to display if the browser does not support submit buttons |
- |
|
|
Yes |
defaultValue |
Sets or returns the default value of the submit button |
3 |
|
|
Yes |
disabled |
Sets or returns whether or not the submit button should be disabled |
5 |
1 |
|
Yes |
form |
Returns a reference to the submit button's parent form |
3 |
1 |
2 |
Yes |
id |
Sets or returns the id of the submit button (In IE 4 this property is read-only) |
4 |
1 |
|
Yes |
name |
Sets or returns the name of the submit button |
3 |
1 |
2 |
Yes |
size |
Sets or returns the size of the submit button |
3 |
|
|
Yes |
tabIndex |
Sets or returns the tab order for the submit button |
4 |
|
|
Yes |
type |
Returns the type of the form element. For a submit object it will always be "submit" |
3 |
1 |
3 |
Yes |
value |
Sets or returns the value of the value attribute of the submit button |
3 |
1 |
2 |
Yes |
Javscript Input Submit Object Methods
Method |
Description |
IE |
F |
N |
W3C |
blur() |
Removes focus from the submit button |
4 |
1 |
|
Yes |
click() |
Simulates a mouse-click on the submit button |
4 |
1 |
2 |
Yes |
focus() |
Sets focus on the submit button |
3 |
1 |
|
Yes |
select() |
Selects the submit button |
4 |
1 |
|
No |
Javscript Input Submit Object Events
Syntax: object.event_name="someJavaScriptCode"
Event |
Description |
IE |
F |
N |
W3C |
onBlur |
Executes some code when the submit button loses focus |
4 |
|
|
|
onClick |
Executes some code when the user clicks on the submit button |
4 |
1 |
2 |
|
onFocus |
Executes some code when the submit button gets focus |
3 |
|
|
|
onSelectStart |
Executes some code when the submit button is selected |
4 |
1 |
4 |
|
Javscript Input Text Object
The Text object represents a text field in an HTML form. For each instance of an <input type="text"> tag in an HTML form, a Text object is created.
You can access a Text object by indexing the elements array (by number or name) of the corresponding form or by using getElementById().
IE: Internet Explorer, F: Firefox, N: Netscape, W3C: World Wide Web Consortium (Internet Standard).
Javscript Input Text Object Properties
Property |
Description |
IE |
F |
N |
W3C |
accept |
Sets or returns a list of content types, which the server processing this form will handle correctly |
- |
|
|
Yes |
accessKey |
Sets or returns the keyboard key to access the text field |
4 |
- |
- |
Yes |
align |
Sets or returns the alignment of the text field according to the surrounding text |
- |
|
|
Yes |
alt |
Sets or returns an alternate text to display if the browser does not support text fields |
- |
|
|
Yes |
defaultValue |
Sets or returns the initial value of the text field |
3 |
1 |
2 |
Yes |
disabled |
Sets or returns whether or not the text field should be disabled |
5 |
1 |
6 |
Yes |
form |
Returns a reference to the text field's parent form |
3 |
1 |
2 |
Yes |
id |
Sets or returns the id of the text field (In IE 4 this property is read-only) |
4 |
1 |
|
No |
maxLength |
Sets or returns the maximum number of characters in the text field |
4 |
1 |
6 |
Yes |
name |
Sets or returns the name of the text field |
3 |
1 |
2 |
Yes |
readOnly |
Sets or returns whether or not the text field should be read-only |
4 |
1 |
6 |
Yes |
size |
Sets or returns the size of the text field |
3 |
1 |
6 |
Yes |
tabIndex |
Sets or returns the tab order for the text field |
4 |
|
|
Yes |
type |
Returns the type of the form element. For a text object it will always be "text" |
3 |
1 |
3 |
Yes |
value |
Sets or returns the value of the value attribute of the text field |
3 |
1 |
2 |
Yes |
Javscript Input Text Object Methods
Method |
Description |
IE |
F |
N |
W3C |
blur() |
Removes focus from the text field |
4 |
1 |
2 |
Yes |
click() |
Simulates a mouse-click in the text field |
4 |
|
|
No |
focus() |
Sets focus on the text field |
3 |
1 |
2 |
Yes |
select() |
Selects the content of the text field |
4 |
1 |
2 |
Yes |
Javscript Input Text Object Events
Syntax: object.event_name="someJavaScriptCode"
Event |
Description |
IE |
F |
N |
W3C |
onBlur |
Executes some code when the text field loses focus |
4 |
1 |
2 |
|
onChange |
Executes some code when the text field loses focus and its value has altered |
3 |
1 |
2 |
|
onClick |
Executes some code when the user clicks the left mouse button in the text field |
4 |
|
|
|
onFocus |
Executes some code when the text field gets focus |
3 |
1 |
2 |
|
onKeyDown |
Executes some code when a key is pressed in the text field |
4 |
1 |
4 |
|
onKeyPress |
Executes some code when an alphanumeric key is pressed in the text field |
4 |
1 |
4 |
|
onKeyUp |
Executes some code when a key is released in the text field |
4 |
1 |
4 |
|
onSelect |
Executes some code when the current selection is changed in the text field |
3 |
1 |
2 |
|
onSelectStart |
Executes some code when some text in the text field is selected |
4 |
|
|
|
|