Javascript| Object | detailed
Document Object
An object that contains information about the current document.
Property
Title of the current document, if not defined, contains "untitled".
Location the full URL of the document.
LastModified contains the date the document was last modified.
Referrer the caller URL, which is the URL from which the user is linked to the current page.
bgcolor background color (#xxxxxx)
Fgcolor foreground text color.
LinkColor the hyperlink color.
Vlinkcolor the hyperlink color accessed.
Alinkcolor Activate chain color (when mouse hold is not placed).
Forms[] An array of form objects in the document, stored in a defined order.
Forms.length the number of form objects in the document.
Links[] The array object that corresponds to all the href chains in the document, defining the store in order.
The number of href chains in the Links.length document.
Anchors[] Anchor (...) Array, which defines the storage in order.
Anchors.length the number of anchors in the document.
Method
Write ("string") highlights the string to the current window. (Strings can contain HTML tags)
Writeln ("string") is similar to write (), appending a carriage return at the end, only in the predetermined format text (
...
Or
...
Effect.
Clear () the current window.
Close () Closes the current window.
Form Object
The string value of the Name property in
Properties
Name
. The class value of the method property in
method, "0" = "Get", "1" = "POST". The string value of the Action property in the
action. The target of the
target table data submission, consistent with the corresponding property in the tag. The
Elements[index] Elements property contains the individual elements in the form. The number of elements in the
length table. The
Method
Submit () submits the form. The
Event handler onsubmit () the code that runs when a user clicks a defined button to submit form. The string value of the
Text and textarea object
Property
Name property. A string value for the content of the
Value field. The
DefaultValue the initial string value of the domain contents. The
Method
Focus () sets the object input focusing. The
Blur () removes the input focus from the object. The
Select () selects the input area for the object. The
event handler
Onfocus executes when the input focus is entered. The
OnBlur is executed when the domain loses focus. The
Onselect executes when some text in a field is selected. The
OnChange executes when the domain loses focus and the domain value is changed relative to onfocus execution.
check box Object
Property
The string value of the name Name property.
The string value of the contents of the Value check box. On if set, or off.
Boolean value for the contents of the Checked check box. True if set, or false.
defaultchecked reflect (CHECKED) The Boolean value of the property (the default state).
Method
Click () to select the check box and make it state "on".
Event handlers
OnClick executes when the user clicks the checkbox.
Radio button (radio) object
Property
The string value of the name Name property.
Length radio The number of radio buttons in the object.
The string value of the value Value property.
Checked Boolean value, press True, otherwise false.
Defaultchecked A Boolean value that reflects the value of the checked property.
Method
Click () Select the Order button.
Event handlers
OnClick executes when the radio button is selected.
Select Object
Property
The number of objects in the length select object.
Name is the internal name of the select object defined by the Name= property.
SelectedIndex the subscript of the currently selected option in the Select object.
Options This property corresponds to the contents of the tag when you define a Select object in HTML, and it has the following properties:
Text string that is marked with text.
Values of the value Value property, which is committed when the submit button is pressed.
Defaultselected A Boolean value that reflects the selected property of the tag.
Selected a Boolean value that reflects the current selection state of option.
Event handlers
Onfocus executes when the input focus is entered into the domain.
OnBlur is executed when the field loses input focus.
OnChange executes onChange when the domain loses focus and if the value of the domain changes relative to onfocus execution.
Button Object
There are three types of buttons in the table defined by the type attribute in the tag:
. Submit (Type= "Submit")
. Reset (type= "reset")
. Custom (type= "button")
All button objects have the following ingredients:
Property
The string value of the value Value property.
The string value of the name Name property.
Method
Click () Select button
Event handlers
OnClick executes when the button is clicked.
Submit and Reset objects
Property
The contents of the Value value= property.
The contents of the name Name= property.
Method
Click () Select button
Event handlers
OnClick executes when the button is clicked.
Password Objects
Property
DefaultValue the contents of the Value= property.
The contents of the name Name= property.
Value currently enters the data for the password field.
Method
Focus () takes you to the password field.
Blur removes the focus from the password domain.
Select () selects the current data in the Password field for modification.
Navigator Objects
This object is used to determine the navigator version that is used when the user accesses.
Property
appCodeName "codename" relative to the user's browser
AppName the actual name relative to the user's browser.
AppVersion The version number relative to the user's browser.
UserAgent This property reflects all the information in the user's browser.