1.Date: Date function
Properties (1):
constructor function Reference of the object being repaired
Prototype properties and methods that can be added to an object
Method (43):
GetDay () returns the day ordinal of a week (0-6)
GetYear () returns the year. Before 2000 is 2 bit, 2000 (including) after 4 bit
getFullYear () returns the full number of 4-bit years
GetMonth () Number of months returned (0-11)
GetDate () return Day (1-31)
GetHours () return hours (0-23)
Getminutes () return minutes (0-59)
Getseconds () returns the number of seconds (0-59)
Getmilliseconds () returns milliseconds (0-999)
GetUTCDay () According to the international time to get today is the day of the Week (0-6)
getUTCFullYear () to lose a full year according to the time of the inter-state
getUTCMonth () According to the international time to get the month (0-11)
getUTCDate () According to International Time Lost Day (1-31)
getUTCHours () Lost hours according to international time (0-23)
getUTCMinutes () minutes by Interstate (0-59)
getUTCSeconds () Returns seconds according to international time (0-59)
getUTCMilliseconds () returns milliseconds based on international time (0-999)
GetTime () to the number of milliseconds that have been spent together since January 1, 1970 0:0:0
getTimezoneOffset () to return to the time zone of the difference, then Greenway time (GMT) to run the original computer time zone setting difference between the number of minutes)
Parse (datestring) returns the number of milliseconds in the date string since January 1, 1970 00:00:00
Setyear (yearint) sets the year. 2-digit or 4-digit number
setFullYear (yearint) sets the year. 4 digits
Setmonth (Monthint) month of release (0-11)
SetDate (Dateint) Set Day (1-31)
Sethours (Hourint) Set hours (0-23)
Setminutes (MININT) set number of minutes (0-59)
Setseconds (Secint) Set number of seconds (0-59)
Setmilliseconds (Milliint) Set MS (0-999)
setUTCFullYear (Yearint) set the year according to the international time
setUTCMonth (Monthint) set the month according to International Time (0-11)
SetUTCDate (Dateint) set the day according to the International Time (1-31)
setUTCHours (hourint) Set hours according to international time
setUTCMinutes (MININT) Set minutes according to international time
setUTCSeconds (Secint) set the seconds according to the international time
setUTCMilliseconds (Milliint) sets milliseconds based on inter-state time
SetTime (Timeint) sets the time since the beginning of January 1, 1970. Number of milliseconds
toGMTString () changes the date to a GMT string, such as: weds,15 June l997 14:02:02 GMT, based on the Greenway time of day for the image (a numeric value)
toUTCString () converts dates of a Date object to a string based on Universal Time
toLocaleString () Changes the Date object's Day (a numeric value) to a string, using the specific date pattern used by the computer on which it is configured
Tosource () Displays the source code of the object
ToString () Converts a Date object to a string
UTC (yyyy, MM, DD, hh, MM, SS, msec) to return to the Greenway scale time to point the gap between the times, double-digit milliseconds
ValueOf () returns the current value of the Date object
2.Math: math function
property:
Constructor function Reference for object Set
Prototype Can be for the properties and ways like to participate in the
E-Euclidean, the natural logarithm of the top (approximately equal to 2.718)
LN2 2 of the natural logarithm (approximately 0.693)
LN10 10 of the natural logarithm (approximately equal to 2.302)
Log2e 2 is the logarithm of the top E. ( Approximately equal to 1.442)
log10e the logarithm of e (approximately equal to 0.434)
Pi∏ The value of 10 (approximately 3.14159)
Sqrt1_2 1/2 (0.5) of the square root (then L divided by 2 square root, about o.707)
SQRT2 2 square root (approximately equal to 1.414)
method:
ABS (x) returns the relative value of a number
ACOs (x) returns the inverse cosine of a number
ASIN (x) returns the sine of the number
Atan (x) returns the inverse tangent of the-PI/2 and PI/2
atan2 (y,x) to (x, y) the angle between-pi to PI
ceil (x) returns the largest integer after x rounding
cos (x) to the cosine of a number
exp (x Returns the E^x value
Floor (x) returns the smallest integer after rounding x
log (x) returns the natural logarithm of base E
Max (x, y) returns the large number of x and y
min (x, y) returns the smaller number of x and y
Po W (x, y) returns the value of the Y^x
Random () returns a random function from 0 to 1
Round (x) Four the sine of the integer
Sin (x) returns the value of the number, and the square root of the returned number
sqrt (x) returns a corner The tangent of the degree
Tosource () displays the object's stream code
ValueOf () returns the initial value of the teaching object
3.Number
Property:
Max_value the largest possible VALUE a number in JavaScript can has 1.7976931348623157E+308
Min_value the smallest possible VALUE a number in JavaScript can has 5E-324
NaN Equal to a value, that's not a number.
Negative_infinity A value that's less than min_value.
Posotive_infinity A value is greater than max_value.
Prototype A static property of the Number object
Method:
ToString Returns A string representing the specified object
ValueOf () returns the initial value of a number of teaching objects
4.Boolean
Property:
The function reference of the object set by constructor
Prototype the properties and ways in which an object can participate
Way:
Tosource () display the stream code of the object
ToString () Converts the value of the cloth to a string and returns the result
ValueOf () returns the original value of the cloth my object
5.String: Character function
Property:
The function reference of the object set by constructor
Prototype can be used for the properties and methods of like participation
Length returns the character lengths of the string
Way (20):
Anchor ("name") is used to convert a string into an HTML anchor face flag (<a name=>)
Big () turns the text in the string into a large font (<BIG>)
Blink () turns text in a string into a shining font (<BLINK>)
Bold () turns the text in the string into a black font (<B>)
Fixed () turns the text in the string into a floating-space font, then Telegraph situation (<TT>)
FontColor (color) sets the color of the text in the string (<font color=>)
Fontsize (size) To change the text in a string to a specified size (<FONTSIZE=>)
Italics () turns the white text in the string into a italic font (<I>)
Link (URL) used to convert a string into a-html (<a href=>)
Small () turns the text in a string into a small font (<SMALL>)
Strike () turns the text in the string into a crossed-out font (<STRIKE>)
Sub () turns the text in the string into a subscript (subscript) font ((sub>)
SUP () turns text in a string into superscript (superscript) font (<SUP>)
CharAt (index) returns the character at the specified index
charCodeAt (index) returns an integer that represents the Unicode encoding of the character at the specified position in a string object
Concat (string2) joins two or fewer strings
fromCharCode (NUM1, num2, ..., bb cream, numn) Gets the specified Unicode value and returns the string
IndexOf (searchstring, StartIndex) returns the first position in a string that renders the specified string
Lastlndexof (searchstring, StartIndex) returns the position of the last rendered specified string in a string
Match (Regex) searches the string for the specified value
Replace (regex, newstring) replaces some characters in a string with other characters
Search (Regex) searches strings for a certain execution value
Slice (StartIndex, EndIndex) extracts the department characters and returns the remaining parts in the new string
Split (delimiter) assigns a string to an array
substr (startIndex, length) from StartIndex with, take length of characters
SUBSTRING (StartIndex, endIndex) characters from StartIndex and EndIndex, not including EndIndex
toLowerCase () turns text in a string into lowercase
toUpperCase () Turns white text in a string into uppercase
Tosource () Displays the source code of the object
ValueOf () returns the original value of the string object
6.Array: Array functions
Property:
constructor function Reference of the object being repaired
Prototype properties and methods that can be added to an object
Index for an array created by a regular expression match, the zero-based index of the match in the string.
Input for an array created by a regular expression match, reflects the original string against which the regular Expressio N was matched.
Length gets the number of array elements, that is, the maximum subscript plus 1
Method (13):
Concat (Array1,arrayn) joins two or more than two array values and returns the result after merging
Join (String) merges elements of an array into a string, October mummy, string is a delimiter. If the provincial parameters are directly merged, no longer separate
Pop () moves the last element in the array and returns when the element
Push (value) adds one or more elements to the end of the array, and returns a new array length value
Reverse () The order of the elements in the inverted array, reversed-back arrangement
Shift () moves the first element in the divisor group and returns the element
Slice (start, deletecount, [item1[, item2[,... [, Itemn]]]) To remove one or fewer elements from an array, and, if necessary, to remove a new element from the position of the removed element, returning the element that was removed
Sort (compare Function), in the case of a given sort number, is arranged according to the order of the element's word, and if it is not a string type, it is converted to a string and then sorted, returning the sorted array
Splice () deletes and Gaga new elements for an array
Tosource () Displays the source code of the object
ToString () returns a string of all elements of the array, separated by commas
Unshift (value) The beginning of the array with one or less meta-meat, and returns the new length
ValueOf () returns the original value of the array object
7.RegExp
Property:
$ $, ..., $9 parenthesized substring matches, if any.
$_ See input.
$* See Multiline.
$& See lastmatch.
$+ See Lastparen.
$ ' See leftcontext.
$ ' See rightcontext.
Global Whether or not to test the regular expression against all possible matches in a string, or only against the first.
IgnoreCase Whether or not to ignore case while attempting a match in a string.
The input the string against which a regular expression is matched.
LastIndex the index at which to start the next match.
Lastmatch the last matched characters.
Lastparen the last parenthesized substring match, if any.
Leftcontext the substring preceding the most recent match.
Multiline Whether or not to search in strings across multiple lines.
Rightcontext the substring following the most recent match.
SOURCE the text of the pattern.
Method:
Compile compiles a regular expression object.
EXEC executes a search for a match in its string parameter.
Test Tests for a match in its string parameter
8.Function
Property:
Arguments an array corresponding to the arguments passed to a function.
Arity indicates the number of arguments expected by the function.
caller specifies which function called the current function.
Prototype allows the addition of properties to a Function object.
approach:
ToString Returns A string representing the specified object.
9.Object
Property:
constructor specifies the function that is creates an object ' s prototype.
Prototype allows the addition of properties to all objects.
Method:
Eval evaluates a string of JavaScript code in the context of the specified object.
ToString Returns A string representing the specified object.
Unwatch removes a watchpoint from a attribute stream the object.
ValueOf Returns The primitive value of the specified object.
Watch Adds a watchpoint to a property source the object.
10. Office
Property:
Infinity Specify a value of plus and minus Infinity
NaN to specify a non-numeric number
Undefined a modified
way:
decodeURI () is a sparse URI-in-stop decoding
decodeURIComponent () Decodes the sparse URI component
encodeURI () encrypts the string to the URI
encodeURIComponent () and dilute the string to the URI component
Escape ( String) to encrypt a string
() using Escape () on a string-in-line decoding
Eval_r (string) to determine a string and execute it in a situation of sufficient code
Isfinite (number) Detects whether a value can be a finite number, return True or False
IsNaN (string) to detect whether a value is not a finite number
numbers () converts the value of an object to a number
Parsefloat (string) Resolves a string to a superficial number
parseint (string) resolves a string to an integer, not a quad-five-in operation, but a trailing
string (object) that converts an object value to a string
number ( object)
11. Things
Property:
A. Window Center event, only valid in body and frameset elements
OnLoad page, or when the picture is loaded,
onunload the user when the page is separated
B. Table two elements of things, is in the table two elements only valid
onchange box content transition
onsubmit point hit the drop button when
OnReset sink new Click the mouse button
Onselect Shirahara is selected when the
onblur element loses focus
Onfocus when the element receives a focal plane
C. Keyboard things, in Base,bdo,br,frame,frameset,head,html,iframe, Meta,param,script,style,title element is not valid
OnKeyDown when the keyboard key is pressed
onkeypress
onkeyup When you press and hold the keyboard key
D. Being base, Bdo,br,frame,frameset,head,html,iframe,meta,param,script,style,title is invalid.
onclick Mouse point when hitting an object
OnDblClick Mouse doubles an object when
OnMouseDown mouse is pressed
OnMouseMove Mouse is moved when
onMouseOut Mouse is new Kaiyuan meat
onmouseover mouse through the element
OnMouseUp
&NBSP When releasing the mouse button;
E. Other
OnResize the window heart or frame is sinking new dimension
Onabort Picture download is resumed
OnError when a document or picture is loaded when the error occurs
Custom objects: Two kinds of methods for starting objects and defining structure functions
A: Start the object
For example: Object ={attribute 1: value 1; Property 2: Value 2; .... Attribute N: Value n} Note: Each attribute/value pair is separated by a semicolon;
B: The object that defines the structure function
For example:
The function is real (property 1, Property 2,...... Attribute N) {
this. Property 1 = property value 1;
this. Property 2 = property value 2;
This. Attribute N= property value N;
This. Method Name 1 = function Name 1;
This. Method Real 2 = function Real 2;
}
Original address: http://blog.sina.com.cn/s/blog_6690bb7f0100ycv8.html
JavaScript built-in functions