Script tag Used to include JavascriptCode. Attribute Language-defined scripting language SRC defines a URL to specify the file ending with. js Windows objects The top-level object of each HTML document. Attribute Frames [] sublists array. Each sublists array is stored in the order defined in the source document. Feames. Length: Number of child partitions. Self current window. Parent window (the current window is a Child Window ). Top-level window (the parent window of all visible windows ). Status browser status window message. Defaultstatus: the default message displayed in the browser status window when status is invalid. Name: the internal name defined by the window opened by the window. open () method. Method Alert ("message") displays the "javascript alert" dialog box containing the given message. Confirm ("message") displays the "Confirm" dialog box containing the given message (there is an OK button and a Cancel button). If you click OK, return true; otherwise, return false. The prompt ("message") displays a "prompt" dialog box. You are required to provide corresponding input based on the displayed message. Open ("url", "name") opens a new window with a specified name. Close () Close the current window. Frame object It is a subwindow of the entire browser window. Besides the status, defaultstatus, and name attributes, it has all the properties of the window object. Location object Contains information about the current URL. Attribute The entire URL string of href. The Protocol contains the first part of the URL, such as http: Host contains a string containing the host name in the URL: port number, for example, // www.cenpok.net/server/ Hostname a string containing the host name in the URL. Such as a http://www.cenpok.net Port contains the possible port number strings in the URL. The part after "/" in the pathname URL. For example ~ LIST/index.htm String after hash "#" (CGI parameter. Search "? "# (CGI parameter. Document Object Objects that contain information about the current document. Attribute Title: The title of the current document. If not defined, it contains "Untitled ". The full URL of the location document. Lastmodified contains the last modification date of the document. The URL of the referrer caller, that is, the URL from which the user is linked to the current page. Bgcolor background color (# xxxxxx) Fgcolor foreground text color. The color of the linkcolor hyperlink. The hyperlink color accessed by vlinkcolor. Alinkcolor activates the link color (when the mouse is not placed ). Forms [] array of form objects in the document, which are stored in the defined order. The number of form objects in the forms. length document. Links [] is an array object corresponding to all href links in the document. Storage is defined in order. The number of href chains in the links. length document. Anchors [] Anchors (...) array, which defines storage in order. Anchors. length the number of anchors in the document. Method Write ("string") to highlight the string to the current window. (The string can contain HTML tags) Writeln ("string") is similar to write (). It appends a carriage return to the end and takes effect only in the pre-formatted text. Clear () clears the current window. Close () Close the current window. Form object Attribute The string value of the name attribute in name. Class value of the method attribute in method, "0" = "get", "1" = "Post ". The string value of the action attribute in the action. Target table data submission target, which is consistent with the corresponding attribute in the tag. The elements [Index] elements attribute contains all elements in form. Number of elements in the length table. Method Submit () Submit the table. The event processor onsubmit () user clicks a defined button to submit the code that runs when the form is submitted. Text and textarea objects Attribute The string value of the name attribute. The string value of the Value Field. The initial string value of the defaultvalue field. Method Focus () sets the object input focus. Blur () removes the input focus from the object. Select () the input area of the selected object. Event Processor Onfocus is executed when the input focus enters. Onblur is executed when the domain loses focus. Onselect is scheduled to run when some text in the field is selected. Onchange is executed when the domain loses focus and the domain value changes from the onfocus execution. Check box object Attribute The string value of the name attribute. The string value of the Value Check box. If it is set, it is "on"; otherwise, it is "off ". A boolean value of the checked check box. If it is set, it is true; otherwise, it is false. Defaultchecked indicates the Boolean value of the (checked) attribute (default state ). Method Click () Select the check box and make it "on ". Event Processor Onclick: it is executed when the user clicks checkbox. Radio button (radio) object Attribute The string value of the name attribute. The number of radio buttons in the length radio object. The string value of the value property. Boolean value of checked. Press true. Otherwise, the value is false. Defaultchecked indicates the Boolean value of the checked attribute value. Method Click () Select a single button. Event Processor Onclick: scheduled to run when the single-choice button is selected. Select object Attribute The number of objects in the length select object. Name is the internal name of the select object defined by name = attribute. The subscript of the currently selected option in the selectedindex select object. Options this attribute corresponds to the content marked when the select object is defined in HTML. It has the following attributes: Text string marked by text. Value of the Value Attribute. When the submit button is pressed, the value is submitted. Defaultselected reflects the Boolean value of the marked selected attribute. The Boolean value that indicates the current selection status of the option. Event Processor Onfocus is executed when the input focus enters the domain. Onblur is executed when the domain loses the input focus. Onchange: When the domain loses focus and the value of the domain changes compared to the onfocus execution, onchange is executed. Button Object There are three types of buttons in the table, which are defined by the Type attribute in the tag: . Submit (type = "Submit ") . Reset (type = "reset ") . Custom (type = "button ") All button objects have the following components: Attribute The string value of the value property. The string value of the name attribute. Method Click () select button Event Processor Onclick: Execute when the button is clicked. Submit and reset objects Attribute Value value = attribute content. Name = attribute content. Method Click () select button Event Processor Onclick: Execute when the button is clicked. Password object Attribute Defaultvalue value = attribute content. Name = attribute content. Value currently enters data in the password field. Method Focus () brings the focus to the password field. Blur () removes the focus from the password field. Select () Select the current data in the password field for modification. Navigator object This object is used to determine the Navigator version used for user access. Attribute Appcodename: "codename" relative to the user's browser" The actual name of the appname relative to the user's browser. The version of appversion relative to the user's browser. Useragent this attribute reflects all information about the user's browser. String object The string object provides many methods for operating the string content. Attribute Length: the number of characters in the string. Method Big (), blink (), bold (), fixed (), italics (), small (), sub (), strike (), sup (), fontcolor (color), fontsize (size) The above method adds the corresponding HTML tag for the string. Charat (INDEX) returns the character at index in the string. Indexof (searchvalue, [fromindex]) This method searches for the first searchvalue in the string. if fromindex is specified, the search starts from the position in the string. When the searchvalue is found, the position of the first character of the string is returned. Lastindexof (searchvalue, [fromindex]) Searches the searchvalue forward from the end of the string and reports the First Instance found. Substring (Indexa, indexb) obtains the substring from Indexa to indexb. Tolowercase (), touppercase () converts all characters in the string to uppercase and lowercase. Date object To use the date object, you must first create a date instance: Variable name = new date (); Method Getday (), getdate (), gethours (), getminutes (), getmonth (), getseconds (), gettime (), gettimezoneoffset (), getyear () And setday ...... Togmtstring () returns the current time in GMT format. (Sun, 12 Feb 1999 14:19:22 GMT) Tolocalestring returns the current time in locale Format. (03/11/99 14:19:22) Parse (date) converts a normal date string into a haoss format, and then sets a parameter for settime. Math object Attribute Ln10 (natural logarithm of 10) Pi (1415926 ...) Sqrt1_2 (square root of 1/2) Method ABS (x) returns the absolute value of X. ACOs (x) returns the arc cosine value of X. Asin (x) returns the arc sin value of X. Atan (x) returns the arc tangent value of X. Ceil (x) returns the smallest integer greater than or equal to X. Cos (x) returns the cosine value of X. Exp (x) returns the X power of E. Floor (x) returns the largest integer less than or equal to X. Log (x) returns X's Max (x, y) returns values in X, Y. Min (x, y) returns a small value in X and Y. Pow (x, y) returns the yth power of X. Round (X) to the nearest integer (rounded off if it is less than or equal to 0.5 decimal places) Sin (x) returns the sin value of X. SQRT (x) returns the square root of X. Tan (x) returns the tangent value of X.
More links to related topics
Event trigger list and Explanation Access XML data using JavaScript Define Your methods with prototype JS games Use Media player on the web page Javascirpt creates "Interactive Pointer" Special Effects Simulate drop-down list box with Layer Implementation of the object equals method in JS Implementation of JavaScript shallow copy and deep copy Document.exe ccommand () Parsing
Intra-Site Search
Title Keyword Search regular search Advanced Search Popular search: CSS fireworks design competition webpage making Dreamweaver 2004 flash
Latest Site List
Duck for the weekend
XHTML 1.0: mark a new beginning Javascript [object. Attribute] highlights
Event trigger list and Explanation
Access XML data using JavaScript
XSL concise tutorial
Solve the security problem of IP address theft in LAN
Chinese traditional color list
78 million Internet users in China, 2nd million in the world
Painter 7 hand-drawn example sketch
Latest topic list
XHTML 1.0: mark a new beginning Javascript [object. Attribute] highlights
Event trigger list and Explanation
Access XML data using JavaScript
XSL concise tutorial
Full Screen playback in CCTV videos
Dm mx 2004 User Login Server Behavior
Full contact with header attributes
Define Your methods with prototype
JS games
|