JavaScript
HTML Input Examples
Examples of
using JavaScript to access and manipulate HTML input objects.
Button
Object
Disable a
button
Find the
name of a button
Find the
type of a button
Find the
value of a button
Find the
text displayed on a button
Find the id
of the form a button belongs to
Form Object
Submit a
form
Reset a form
Find the
value of each element in a form
Find the
accepted character set of a form
Find the
action attribute of a form
Find the
value of the enctype attribute in a form
Find the
number of elements in a form
Find the
method for sending form data
Find the
name of a form
Find the
target of a form
Option and
Select Objects
Disable and
enable a dropdown list
Get the id
of the form that contains the dropdown list
Get the
number of options in the dropdown list
Turn the
dropdown list into a multiline list
Select
multiple options in a dropdown list
Display the
selected option in a dropdown list
Display all
options from a dropdown list
Display the
index of the selected option in a dropdown list
Change the
text of the selected option
Remove
options from a dropdown list
0 comments: