Script tag
Used to include JavaScript code.
grammar
Attributes
Language defines a scripting language
SRC defines a URL to specify files ending with .js.
Windows object
The top-level object of each HTML document.
Attributes
Frames [] subride array. Each subrill array is stored in the order defined in the source document.
Feames.Length subris.
Self Current window.
The Parent parent window (the current window is a child window).
TOP top window (the parent window of all visible windows).
The message on the Status browser status window.
DEFAULTSTATUS When Status is invalid, the default message on the browser status window appears.
Name internal name, the name defined by the window opened by a Window.Open () method.
method
Alert ("Message" displays the "JavaScript Alert" dialog containing a given message.
Confirm ("Message") Displays the "CONFIRM" dialog containing a given message (with a OK button and a Cancel button). If the user comes to OK to return true, it returns false.
Prompt ("Message") Displays a "Prompt" dialog that requires the user to give appropriate input according to the display message.
Open ("URL", "Name") opens a new window and gives a specified name.
Close () Close the current window.
Frame object
It is a sub-window of the entire browser window. In addition to Status, defaultstatus, named, it has all properties of the Window object.
Location object
Contains information about the current URL.
Attributes
HREF's entire URL string.
Protocol contains a string of the first part of the URL, such as http:
Host contains a string of hostnames in the URL: port number part. Such as //www.cenpok.net/server/
Hostname contains a string of the hostname in the URL. Such as http://www.cenpok.net
Port contains a port number string that may exist in the URL.
Part of the "/" in the Pathname URL. Such as ~ List / Index.htm
The string after the Hash "#" (CGI parameter).
Strings after Search "?" (CGI parameters).
Document object
Contains the object of the current document information.
Attributes
Title current document title, if not, "Untitled" is included.
The full URL of the Location document.
LastModified contains the document last modified date.
The REFERRER caller URL, that is, which URL is linked to the current page from the user.
Bgcolor background color (#xxxxxx)
FGColor foreground color.
LinkColor hyperlink color.
VLINKCOLOR visits the super chain colors.
AlinkColor activation chain color (mouse is not placed).
The array of Form objects in the Forms [] document is stored in the defined order.
The number of FORM objects in the Forms.Length document.
Links [] is in order to define storage in order to all HREF chains in the document.
The number of HREF chains in the links.length document.
Anchors [] Anchor (...) array, defined in order.
ANCHORS.LENGTH Document The number of anchors.
method
Write ("String") highlights the string to the current window. (String can contain HTML tags)
Writeln ("string") is similar to Write (), adding a carriage return at the end, only in the scheduled format (
... or ...) take effect.
Clear () clear the current window.
Close () Close the current window.
FORM object
Attributes
Name
The string value of the Name property.
The class value of the Method attribute in Method, "0" = "get", "1" = "post" string value of the action attribute in the action.
Target table data submitted, the corresponding attributes in the tag are consistent.
Elements [index] Elements property contains individual elements in the Form.
The number of elements in the Length form.
method
Submit () submit form.
Event Processor OnSubmit () User Click a defined button to submit the code that is running when Form.
Text and Textarea objects
Attributes
The string value of the Name Name property.
VALUE domain content string value.
The initial string value of the DEFAULTVALUE domain content.
method
FOCUS () Sets the object input focus.
BLUR () removes the input focus on the object.
Select () Select the input area of the object.
Event processor
ONFOCUS is executed when entering the focus.
ONBLUR is executed when the domain is lost.
Onsect is executed when some text in the domain is selected.
The ONCHANGE is executed when the domain is lost and the domain value is performed relative to the onfocus.
Check box (checkbox)
Attributes
The string value of the Name Name property.
Value check box content string value. If set, "ON", otherwise "OFF".
The Boolean value of the checked check box content. If set, TRUE is set, otherwise False.
DefaultChecked Reflects the Boolean value of the attribute (default).
method
Click () Select the check box and make the status as "on".
Event processor
OnClick is executed when a user clicks CheckBox.
Single selection button (RADIO) object
Attributes
The string value of the Name Name property.
The number of radio buttons in the LENGTH RADIO object.
Value Value property string value.
Checked Boolean value, press True, otherwise false.
DEFAULTCHECKED reflects the Boolean value of the checkage attribute value.
method
Click () Select the radio button.
Event processor
OnClick is executed when a radio button is selected.
SELECT object
Attributes
The number of objects in the LENGTH SELECT object.
Name The internal name of the SELECT object defined by the Name = property.
The subscript of the option Option in the SelectedIndex Select object is currently selected.
Options This property corresponds to the content in the tag when defining the Select object in HTML, which has the following properties:
Text string after Text tag.
The value of the value value attribute is submitted when the Submit button is pressed.
DefaultSelected reflects the Boolean value of the SELECTED property of the tag.
SELECTED reflects the Boolean value of the currently selected state of Option.
Event processor
ONFOCUS is executed when the input focus enters the domain.
ONBLUR is executed when the domain has lost the input focus.
Onchange is lost when the domain is lost, and if the domain is changed, the ONCHANGE is changed when the value of the ONFOCUS is executed.
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:
Attributes
Value Value property string value.
The string value of the Name Name property.
method
Click () selected button
Event processor
OnClick is executed when the button is clicked.
Submit and reset object
Attributes
Value value = content of the property.
Name name = content of the property.
method
Click () selected button
Event processor
OnClick is executed when the button is clicked.
Password object
Attributes
DefaultValue value = content of the property .Name Name = content of the property.
Value is currently entering data from the Password domain.
method
FOCUS () Bring the focus into the Password domain.
Blur will move the focus from the Password domain.
Select () Select the current data in the Password domain for modification.
Navigator object
This object is used to determine the Navigator version used when users are accessible.
Attributes
AppCodename relative to the user's browser's "CODENAME"
Appname relative to the actual name of the user browser.
Appversion relative to the version number of the user browser.
UseERAGENT This property reflects all the information of the user browser.