JavaScript Object details

Source: Internet
Author: User
Tags natural logarithm set cookie square root
Document. Body. scrolltop returns and sets the coordinate value of the current vertical scroll bar, which must be used with the function,
Document. Body. scrollleft returns and sets the coordinate values of the current Horizontal Rolling task, which must be used with the function,
Window. Status = defaultstatus set the status bar to display by default
HTML source code in the obejct. innerhtml object OBJECT tag
Obejct. outerhtml object HTML source code (including the tag itself)

Math. max_value the maximum number of JavaScript values. The maximum value is 1.7976931348623157e + 308.
Math. min_value the minimum possible value of A number greater than 0 in Javascript; minimum value: 5e-324
Any value of math. Nan that is not a number
Math. negative_infinity Javascript is smaller than any number with the maximum negative number; that is, any number smaller than-1.7976931348623157e + 308
Math. positive_infinity Javascript is greater than any number with the largest positive number; that is, any number smaller than 1.7976931348623157e + 308
Math. e Euler constant (E), approximate value: 2.718281828459045
Math. Pi constant π, approximate value: 3.141592653589793
Absolute Value of math. Abs (number) Number
Math. ACOs (number) number (must be between-1 and + 1) returns the arc cosine between 0 and π radians.
Math. asin (number) number (must be between-1 and + 1) returns an arc sine in the range of-π/2 and π/2 radian.
The arc tangent of math. atan (number) number. The returned value ranges from-π/2 to π/2 radian.
Math. atan2 (Y, x) y/X (here (X, Y) is the dikar coordinate value) returns an arc tangent in the range of-π/2 and π/2 radian
Math. Ceil (number) is a minimum integer greater than or equal to number.
The cosine of math. Cos (number) number. The return value ranges from-1 to 1.
Math. exp (number) E number power
Math. Floor (number) is smaller than or equal to the maximum integer of number, and all decimals are taken
Math. Log (number) natural logarithm of number (base on E)
Math. Max (number1, number2) returns a larger number of number1 and number2
Math. Min (number1, number2) returns a smaller value of number1 and number2.
Math. Pow (number1, number2) returns the number2 power of number1.
Math. Random () random function, which can only be a number between 0 and 1. To get another number, it can be * 10 and then rounded up.
Math. Round (number) the integer nearest to number (rounding the fractional part)
Math. Sin (number) number is sine, And the return value ranges from-1 to 1.
Math. SQRT (number) number (must be greater than or equal to 0) Square Root
Math. Tan (number) number (expressed in radians) tangent
Math. tostring (number) and number are equivalent strings
Parseint (string, base) converts a string to a number. If the string starts with a number followed by some text, the function returns only the integer part starting with the string. String: string to be converted. Base: (optional) number in the string. The default value is 10.
Parsefloat (string) converts a string to a number. If the string starts with a number followed by some text, the function returns only the numeric portion starting with the string.

Navigator. appcodename internal code name related to the browser
Navigator. appminorversion auxiliary version number (usually a patch or service package applied to a browser)
The official name of the navigator. appname browser. for Internet Explorer, Microsoft Internet Explorer is returned, and for Netscape Navigator, Netscape is returned.
Version number of the navigator. appversion Browser
Navigator. cookieenabled: If your browser is set to allow cookies, true is returned; otherwise, false is returned.
The CPU model of the computer in which the navigator. cpuclass browser is running (usually the Intel chip returns x86, And the PowerPC chip returns PPC)
The language supported by the navigator. language browser (English returns en, German returns de, and so on)
Arrays of all MIME types supported by the navigator. mimetypes browser (Internet Explorer only supports this attribute in Macintosh version 5)
Navigator. Online: If the browser (IE) is in online mode, true is returned; otherwise, false is returned.
The operating system in which the navigator. oscpu browser is running. CPU usage may also be reported in some systems.
Navigator. the operating platform running on the platform browser. Valid values include Win16 (Windows 3.x), Win32 (Windows 9x, me, NT, 2000), mac68k (Macintosh 680x0), and macppc (Macintosh PowerPC)
Product Name of navigator. Product Browser
Navigator. productsub: more information related to browser products. For example, in Netscape 6, this property returns the program creation date.
Navigator. securityPolicy indicates the encryption type supported by the browser. Export Policy indicates a low-encryption method. US & Ca domestic policy indicates a high-encryption method.
Navigator. systemlanguage: the default language supported by the operating system. For example, en-US indicates English (United States)
Navigator. useragent contains all or part of the attributes: appcodename, appname, appversion, language, and platform.
Navigator. userlanguage: Language set by the user on the system
Navigator. USERPROFILE returns a USERPROFILE object that stores the user's personal information.
Navigator. Vendor's browser company
Navigator. Vendor more information about browser Manufacturers

String. anchor (name) converts a string to an <A Name> anchor. The name attribute value is given by the name parameter. This method is equivalent to the following statement: <a name = "name"> string </a>
String. Big () is the same as the <big> mark in HTML and formatted string in the same way. This method is equivalent to the following statement: <big> string </big>
String. Blink () is the same as the <blink> mark in HTML, and is equivalent to the following statement: <blink> string </blink>
String. Bold () is the same as the <B> mark in HTML. It is equivalent to the following statement: <B> string </B>
String. Fixed () is the same as the <tt> mark in HTML. It is equivalent to the following statement: <tt> string </tt>
String. fontcolor (color) is the same as the <font color> mark in HTML. It is equivalent to the following statement: <font color = "color"> string </font>
String. fontsize (size) is the same as the <font size> mark in HTML. It is equivalent to the following statement: <font size = "size"> string </font>
The <I> mark of string. Italics () is the same as that of HTML. It is equivalent to the following statement: <I> string </I>
String. Link (URL) converts string into a <a href> link tag, which is equivalent to the following statement: <a href = "url"> string </a>
String. Small () is the same as the <small> mark in HTML. It is equivalent to the following statement: <small> string </small>
String. Strike () is the same as the <strike> mark in HTML. It is equivalent to the following statement: <strike> string </strike>
String. sub () is the same as the <sub> mark in HTML. It is equivalent to the following statement: <sub> string </sub>
String. Sup () is the same as the <sup> mark in HTML. It is equivalent to the following statement: <sup> string </sup>
String. charat (INDEX) returns the index character in string.
String. charcodeat (INDEX) returns the character code with the index position in string.
String. indexof (substring, start) the first position of substring in string.-1 is not returned.
String. lastindexof (substring, start) the last position of substring in string.-1 is not returned.
String. Slice (START, end) returns the substring whose start index position is start and end index position is before end.
String. Split (separator, limit) returns an array, each of which is a string substring, and these substrings are separated by Separator
String. substr (START, Len) returns a substring whose start index position is start and its length is Len.
String. substring (START, end) returns the substring with the start index and end index in string.
String. Concat (string2) connects string2 to the end of the string. In other words, this method is equivalent to: string + string2
String. fromcharcode (code1, code2, etc) creates a string consisting of the corresponding characters such as code1 and code2.
String. Match (regular_expression) searches for the substring matching regular_expression from string, and returns an array containing all matching values.
String. Replace (regular_expression, replace_string) searches for all substrings matching regular_expression from string and replaces these substrings with replace_string.
String. Search (regular_expression) searches for all substrings matching regular_expression from string, but returns only the index of the first substring instance.
String. tolowercase () converts all strings to lowercase letters.
String. touppercase () converts all strings to uppercase

Event. clientx returns the X coordinate value of the last mouse clicked;
Event. clienty returns the last mouse y coordinate value;
Event. offsetx returns the X coordinate value of the current mouse hover.
Event. offsety returns the Y coordinate value of the current mouse hover.
Event. Button = 1/2/3 left mouse button equals 1 right button equals 2 press 3 together

Opener controls the original open form object
Parent control framework parent page
Windowobject. Closed: whether windowobject is disabled in the window; true/false
Eval (string) converts a string into JavaScript code
Confirm (string) pop-up confirmation box, OK return true cancel return false
Prompt ("prompt message", "pre-value") input statement
Alert (string) pop-up prompt box, the prompt box shows the content as string
Form. Reset () resets the data in the form.
Form. Submit () enables the form object to submit data
Cleartimeout (object) clears the set setTimeout object
Clearinterval (object) clears the set setinterval object
SetTimeout ("function", time) sets a timeout object
Setinterval ("function", time) sets a timeout object

Typeof (object) checks the obejct type, values: String, Boolean, object, function, underfined
Object. Prototype. ownerattribute = add custom attributes or methods to the object.

Screen. availwidth the maximum available height of the User display, in pixels
Screen. availheight the maximum available width of the User display, in pixels
Screen. colordepth number of available digits per pixel on the User display
Screen. height the actual height of the user monitor, in pixels
Screen. pixeldepth (only used for Netscape 4 +) indicates the maximum number of digits per pixel.
Screen. Width: the actual width of the User display, in pixels.

Window. resizeTo (x, y) set the width and height of the window (absolute coordinates)
Window. resizeBy (x, y) set the window width and height (relative coordinates)
Window. moveTo (x, y) Move the window to a certain position (absolute coordinate)
Window. moveBy (x, y) Move the window to a certain position (relative coordinates)
Window. Scroll (x, y) the coordinates of the window scroll bar. y controls the movement up and down. It must be used with the function (absolute coordinates)
Window. scrollby (x, y) the coordinates of the window scroll bar. y controls the movement up and down, and must be used with the function (relative coordinates)
Window. Focus () to make the current window focus
Window. open () window. Open ("Address", "name", "attribute ")
Attributes: toolbar, location, ctions, status, menubar, scrollbar, and resizable ), width (width), height (height), fullscreen (full screen), scrollbars (no scroll bar in full screen), channelmode (wide screen), left (X coordinates of window opening ), top (open the Y coordinate of the window)
Window. Location = 'view-Source: '+ window. Location. href application event view webpage source code;

Location. Protocol is a protocol used by browsers and servers to communicate with each other, such as http:
Location. hostname is the name of the server that publishes the host documentation, for example, www.abiaos.com.
Location. Port is the port used by the browser to communicate with the server, such as 80.
Location. Host specifies the host name and port in the address. This attribute is equal to: Hostname + ":" + Port
The path and file name of the location. pathname document. For example,/about/index.html
Location. Hash specifies the anchor name in the address, which follows the symbol #.
Location. Search from question mark (?) To the end of the address section, including? But does not contain the anchor name.
Location. href indicates the entire address, which is equivalent to location.
Location. Reload (source) Reload the page. Source (optional) is a Boolean value. Determines where the browser reloads the page: use false (default) to load the page from the buffer that saves the page; use True to force the browser to load the page from the server.
Location. Replace (URL) replaces the page with the Historical List. When history. Go (-1) is called, the page that calls the function will be skipped.

History. Back () simulate the back button
History. Forward () simulate the forward button
History. Go (how_far) returns any page in the history list. How_far is an integer. The negative number is backward, the positive number is forward, and the current page is refreshed without any changes. Running history. Go (0) is different from running location. Reload. The history. Go (0) method only refreshes the page, which means that the data in the input form will not change.

Document. activeelement: When a document has a focus, the system returns an object with a focus (ie4 +)
Document. alinkcolor returns or sets the link color in the document, which is equivalent to the alink attribute in the <body> tag.
Document. Anchors returns an array composed of all the anchors in the document.
Document. Applets the returned document contains an array consisting of all Java applets (<APPLET> tags ).
Document. bgcolor returns or sets the background color of the document, which is equivalent to the bgcolor attribute in the <body> tag.
Document. Cookie return or set cookie
Default character set (ie4 +) used in document. defaultcharset)
Document. Domain returns or sets the default domain name of the document
Document. embeds returns an array consisting of all embedded objects (<embed> tags) in the document.
Document. fgcolor returns or sets the foreground (text) color of the document; equivalent to the text attribute in <body>
Document. filecreateddate: the date when the document was created (ie4 +)
Document. filemodifieddate returns the Last modified Date of the document (ie4 +)
Document. filesize the size of bytes returned for the document (ie4 +)
Document. Forms returns an array consisting of All Forms (<form> tags) in the document.
Document. Images returns an array of all images in the document.
Document. Forms. Length returns the number of form forms on the current page
Document. Anchors. Length returns the number of anchors on the current page.
Document. Links. Length returns the number of connections on the current page.
Document. lastmodified returns the Last modified Date of the document.
Document. Layers returns an array (only netscape4) consisting of all layers (<layer> tags) in the document)
Document. linkcolor returns or sets the color of the link that is not accessed in the document. It is equivalent to the link attribute in <body>.
Document. Links returns an array composed of all links in the document.
Document. Location returns or sets the document address
Document. nameprop return the file name of the document (ie4 +)
Document. readystate returns the current state of the document (loading is returned when the document is being loaded; complete is returned when the document is loaded) (ie4 +)
Document. referrer returns the URL that the user uses to surf the current document. If the current document is a homepage or a page arrives by entering a URL, this property returns an empty string
Document. scripts returns an array consisting of all scripts (<SCRIPT> tags) in the document. (Ie4 +)
Document. Title returns or sets the document title given by the <title> MARK
Document. url returns or sets the document address
Document. vlinkcolor returns or sets the color of the accessed link in the document; equivalent to the vlink attribute in <body>
Document. captureevents () intercepts an event so that it is processed by the document object rather than the object of the activated event. (Netscape4 +)
Document. Clear () Clear all text and markup of the document
Document. Close () Close the output stream used to write text to the document
Document. open () open an input stream and write text to the document
Document. releaseevents () release the event intercepted by the Document Object (netscape4 +)
Document. routeevent () intercepts an event so that it is processed by the document object, and then passes the event to the object activated to the event. (Netscape4 +)
Document. Write () write data to the document
Document. writeln () writes a row of data to the document, followed by a carriage return

Link.tar get value specified by the target attribute
Text (ie4 + and netscape6) between link. innerhtml and <a href> and </a>)
Text between the <a href> and </a> labels of link. Text (netscape4 +)
Note: Each link object is also a location object. That is to say, the properties of all location objects are also the properties of link objects, but the location object method cannot be used for Link objects.

Anchor. Name anchor Object Name Attribute Value
Text (ie4 + and netscape6) between link. innerhtml and <A Name> and </a>)
Text between the <A Name> and </a> labels of link. Text (netscape4 +)

Image. Complete: if the image is still loaded, false is returned. If the image is fully loaded, true is returned.
Triggered when the image download is canceled
Triggered when image loading fails
Triggered when the image is fully loaded

Document. cookie = "name = value; expires = gmt_string; domain = cookie_domain; Path = cookie_dir; cooke_secure" Name: Cookie name; Value: cookie value; gmt_string: indicates the GMT format string of the cookie end date; cookie_dir: Specifies the string that can access the top-level directory of the cookie; cookie_domain: Specifies the string of the domain name or identifier; cookie_secure: if it is true, the cookie is sent only to the browser that uses the HTTPS (secure) protocol link. If it is false (or ignored), it is sent to all browsers, even if an insecure HTTP protocol is used

New Date () create a date object (current time)
New date ("month DD, yyyy hh: mm: SS") creates a date object
New Date (yyyy, MTH, DD, HH, mm, SS) to create a date object
New Date (MS) creates a date object (MS: milliseconds since January 1, GMT)
Date. getyear () Get the year value two-digit year
Date. getfullyear () obtain the number of annual copies in four-digit years (, etc)
Date. getmonth () Get a month in the year, from 0 (January )~ 11 (December)
Date. getdate () gets a day in a month from 1 ~ 31
Date. getday ()/get the value of the current week, from 0 (Sunday) )~ 6 (staturday)
Date. gethours () Get the current hour, from 0 (midnight )~ 23 (pm)
Date. getminutes () Get the current number of minutes, from 0 ~ 59
Date. getseconds () Get the current number of seconds, from 0 ~ 59
Date. getmilliseconds () Get the current number of milliseconds, from 0 ~ 999
Date. gettime () the number of milliseconds since January 1, January 1, 1970 GMT
Date. tolocalestring () gets the time from the time object, which exists as a string
Note: Except getday (), all other get functions have a corresponding set function.

Object. style. fontsize = "text size ";
Unit: mm/CM/in inch/PC/PT point/PX pixel/EM text height
1In = 1.25
1 Pc = 12pt
1pt = 1.2px (800*600 resolution)
Text font attributes:
Fontsize
Family font
Color
Fontstyle. The value is normal, italic, and oblique italic and bold.
Fontweight bold, ranging from 100 to 900, 900 rough, light, normal, bold
Letterspacing distance, change the text distance, value: 1pt, 10px, 1 cm
Textdecoration: Text modifier; optional values: None, underline, and overline
Background: Text background color,
Backgroundimage: background image. The value is the insert path of the image.

Click function call trigger on the webpage body:
1. onclick when an object is clicked
2. onload when a webpage is opened, it can only be written in the body
3. onUnload: When a webpage is closed or left, it can only be written in the body.
4. onmouseover when the mouse hangs over it
5. onmouseout when the mouse leaves the object
6. onmouseup when the mouse is released
7. onmousedown when the mouse presses the key
8. onfocus: when the object obtains the focus
9. onselect when the object text is selected
10. onchange when the object content is changed
11. onblur when the object loses focus
Onsubmit = return (SS () value returned when the form is called
Straight Line border-bottom: 1x solid black
Dotted Line border-bottom: 1x dotted black
Dash border-bottom: 2x dashed black
Double Line border-bottom: 5x double black
Slot border-bottom: 1x groove black
Ridge border-bottom: 1x ridge black

1. Glow (color = color, strength = light size)
2. fliph () enables the object to flip 180 degrees horizontally.
3. Vertical flip flipv (): 180 degrees vertical flip of Objects
4. object fuzzy blur (add = true/false direction = direction strength = intensity)
Add: Specifies whether to perform fuzzy direction based on the impression style; fuzzy direction: strength; fuzzy intensity
5. transparent object alpha (opaction = 0-100, finishopacity = 0-100, style = 0/1/2/3)
Opaction object overall opacity value finishopacity when the object uses the progressive transparency, this specifies the end transparency position opacity value. Style specifies the transparency mode. 0 indicates the overall transparency, 1 indicates the linear transparency, and 2 indicates the circular transparency, 3. rectangular transparency
6. Remove the color chroma (color = color value) to make the color area of the object transparent with the specified color
7. Create a shadow dropshadow (color = shadow color, offx = horizontal deviation from the pixel to the left, offy = horizontal deviation from the pixel)
8. Color-removing gray () enables gray-scale display of Objects
9. Negative Effect invert (): displays negative effects on objects.
10. Highlight light (): displays the object in black.
11. Mask mask (color = color) so that the entire object is masked once in the specified color
Opacity table transparency level. 0 ~ 100, 0 tables are completely transparent, and tables are completely opaque
Gradient transparency to be set in the finishopacity table. 0 ~ 100.
Style table transparent area shape. 0 table uniform shape. 1 Table linear. 2 Table radiology. 3 Table rectangle.
The X and Y coordinates at the beginning of the gradient transparency effect in the startx. starty table.
Coordinates of X and Y at the end of the finishx and finishy gradient transparency effect.
Add to determine whether to make the original target in the blur effect. The value is 0, 1.0 table "no", 1 Table "yes ".
Ction sets the direction of The Blur. 0 degrees the table is vertical up, 45 degrees is a unit. The default value is 270 degrees to the left. Left, right, down, up.
Strength can only be determined by an integer. It indicates that the width of the number of pixels will be blurred. The default value is 5.
The color must be transparent.
Offx and offy are respectively the offsets of shadows in the X and Y directions.
Positive refers to the projection method. 0 table transparent pixel shadow generation. 1 Table only gives opaque pixel shadow generation ..
Addambient: adds a surrounded light source.
Addcone: Add a conical light source.
Addpoint
Changcolor: change the color of light.
Changstrength: changes the intensity of the light source.
Clear: Clear all light sources.
Movelight: mobile light source.
Freq is the ripple frequency. It specifies the number of finished ripple to be generated in the area on the object.
Lightstrength can be used to enhance the effect of ripple-shaped light and shadow ~ 100 positive integer. the start position of the sine wave is 0 ~ Table 0 starts from 0 degrees and Table 25 starts from 90 degrees.
The amplitude of the Strength table.

Hand style = "cursor: hand"
Crosshair style = "cursor: crosshair"
Text style = "cursor: Text"
Wait style = "cursor: Wait"
Default style = "cursor: Default"
Help style = "cursor: help"
E-resize style = "cursor: E-resize"
Ne-resize style = "cursor: NE-resize"
N-resize style = "cursor: N-resize"
NW-resize style = "cursor: NW-resize"
W-resize style = "cursor: W-resize"
S-resize style = "cursor: S-resize"
Sw-resize style = "cursor: Sw-resize"
Se-resize style = "cursor: Se-resize"
Auto style = "cursor: Auto"

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.