Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

JavaScript 方法索引

这篇翻译不完整。请帮忙从英语翻译这篇文章


这篇文章按照字母顺序列出了MDN里边所有的JavaScript方法。

Found 340 pages with the tag "Method":

A

  • abs: The Math.abs() function returns the absolute value of a number, that is
  • acos: The Math.acos() function returns the arccosine (in radians) of a number, that is
  • acosh: The Math.acosh() function returns the hyperbolic arccosine of a number, that is
  • add: The add() method appends a new object to the end of a WeakSet object.
  • add: The add() method appends a new element with a specified value to the end of a Set object.
  • all: The Promise.all(iterable) method returns a promise that resolves when all of the promises in the iterable argument have resolved.
  • anchor: The anchor() method creates an <a> HTML anchor element that is used as a hypertext target.
  • apply: The apply() method calls a function with a given this value and arguments provided as an array (or an array-like object).
  • apply: The handler.apply() method is a trap for a function call.
  • asin: The Math.asin() function returns the arcsine (in radians) of a number, that is
  • asinh: The Math.asinh() function returns the hyperbolic arcsine of a number, that is
  • assign: The Object.assign() method is used to copy the values of all enumerable own properties from one or more source objects to a target object. It will return the target object.
  • atan: The Math.atan() function returns the arctangent (in radians) of a number, that is
  • atan2: The Math.atan2() function returns the arctangent of the quotient of its arguments.
  • atanh: The Math.atanh() function returns the hyperbolic arctangent of a number, that is

B

  • big: The big() method creates a <big> HTML element that causes a string to be displayed in a big font.
  • bind: The bind() method creates a new function that, when called, has its this keyword set to the provided value, with a given sequence of arguments preceding any provided when the new function is called.
  • blink: The blink() method creates a <blink> HTML element that causes a string to blink.
  • bold: The bold() method creates a <b> HTML element that causes a string to be displayed as bold.

C

  • call: The call() method calls a function with a given this value and arguments provided individually.
  • catch: The catch() method returns a Promise and deals with rejected cases only. It behaves the same as calling Promise.prototype.then(undefined, onRejected).
  • cbrt: The Math.cbrt() function returns the cube root of a number, that is
  • ceil: The Math.ceil() function returns the smallest integer greater than or equal to a given number.
  • charAt: The charAt() method returns the specified character from a string.
  • charCodeAt: The charCodeAt() method returns the numeric Unicode value of the character at the given index (except for unicode codepoints > 0x10000).
  • clear: The clear() method removes all elements from a WeakMap object.
  • clear: The clear() method removes all elements from a WeakSet object.
  • clear: The clear() method removes all elements from a Map object.
  • clear: The clear() method removes all elements from a Set object.
  • clz32: The Math.clz32() function returns the number of leading zero bits in the 32-bit binary representation of a number.
  • codePointAt: The codePointAt() method returns a non-negative integer that is the UTF-16 encoded code point value.
  • compile: The deprecated compile() method is used to (re-)compile a regular expression during execution of a script. It is basically the same as the RegExp constructor.
  • concat: The concat() method returns a new array comprised of the array on which it is called joined with the array(s) and/or value(s) provided as arguments.
  • concat: The concat() method combines the text of two or more strings and returns a new string.
  • construct: The handler.construct() method is a trap for the new operator.
  • copyWithin: The copyWithin() method copies the sequence of array elements within the array to the position starting at target. The copy is taken from the index positions of the second and third arguments start and end. The end argument is optional and defaults to the length of the array. This method has the same algorithm as Array.prototype.copyWithin. TypedArray is one of the typed array types here.
  • copyWithin: The copyWithin() method copies the sequence of array elements within the array to the position starting at target. The copy is taken from the index positions of the second and third arguments start and end. The end argument is optional and defaults to the length of the array.
  • cos: The Math.cos() function returns the cosine of a number.
  • cosh: The Math.cosh() function returns the hyperbolic cosine of a number, that can be expressed using the constant e:
  • create: The Object.create() method creates a new object with the specified prototype object and properties.

D

  • defineProperties: The Object.defineProperties() method defines new or modifies existing properties directly on an object, returning the object.
  • defineProperty: The Object.defineProperty() method defines a new property directly on an object, or modifies an existing property on an object, and returns the object.
  • defineProperty: The handler.defineProperty() method is a trap for Object.defineProperty().
  • delete: The delete() method removes the specified element from a Map object.
  • delete: The delete() method removes the specified element from a Set object.
  • delete: The delete() method removes the specified element from a WeakMap object.
  • delete: The delete() method removes the specified element from a WeakSet object.
  • deleteProperty: The handler.deleteProperty() method is a trap for the delete operator.

E

  • endsWith: The endsWith() method determines whether a string ends with the characters of another string, returning true or false as appropriate.
  • entries: The entries() method returns a new Array Iterator object that contains the key/value pairs for each index in the array.
  • entries: The entries() method returns a new Iterator object that contains the [key, value] pairs for each element in the Map object in insertion order.
  • entries: The entries() method returns a new Array Iterator object that contains the key/value pairs for each index in the array.
  • entries: The entries() method returns a new Iterator object that contains an array of [value, value] for each element in the Set object, in insertion order. For Set objects there is no key like in Map objects. However, to keep the API similar to the Map object, each entry has the same value for its key and value here, so that an array [value, value] is returned.
  • enumerate: The handler.enumerate() method is a trap for for...in statements.
  • eval: The Object.eval() method used to evaluate a string of JavaScript code in the context of an object, however, this method has been removed.
  • every: The every() method tests whether all elements in the array pass the test implemented by the provided function.
  • every: The every() method tests whether all elements in the typed array pass the test implemented by the provided function. This method has the same algorithm as Array.prototype.every(). TypedArray is one of the typed array types here.
  • exec: The exec() method executes a search for a match in a specified string. Returns a result array, or null.
  • exp: The Math.exp() function returns ex, where x is the argument, and e is Euler's constant, the base of the natural logarithms.
  • expm1: The Math.expm1() function returns ex - 1, where x is the argument, and e the base of the natural logarithms.

F

  • fill: The fill() method fills all the elements of an array from a start index to an end index with a static value.
  • fill: The fill() method fills all the elements of a typed array from a start index to an end index with a static value. This method has the same algorithm as Array.prototype.fill(). TypedArray is one of the typed array types here.
  • filter: The filter() method creates a new array with all elements that pass the test implemented by the provided function.
  • filter: The filter() method creates a new typed array with all elements that pass the test implemented by the provided function. This method has the same algorithm as Array.prototype.filter(). TypedArray is one of the typed array types here.
  • find: The find() method returns a value in the array, if an element in the array satisfies the provided testing function. Otherwise undefined is returned.
  • find: The find() method returns a value in the typed array, if an element satisfies the provided testing function. Otherwise undefined is returned. TypedArray is one of the typed array types here.
  • findIndex: The findIndex() method returns an index in the typed array, if an element in the typed array satisfies the provided testing function. Otherwise -1 is returned.
  • findIndex: The findIndex() method returns an index in the array, if an element in the array satisfies the provided testing function. Otherwise -1 is returned.
  • fixed: The fixed() method creates a <tt> HTML element that causes a string to be displayed in fixed-pitch font.
  • floor: The Math.floor() function returns the largest integer less than or equal to a given number.
  • fontcolor: The fontcolor() method creates a <font> HTML element that causes a string to be displayed in the specified font color.
  • fontsize: The fontsize() method creates a <font> HTML element that causes a string to be displayed in the specified font size.
  • for: The Symbol.for(key) method searches for existing symbols in a runtime-wide symbol registry with the given key and returns it if found. Otherwise a new symbol gets created in the global symbol registry with this key.
  • forEach: The forEach() method executes a provided function once per array element.
  • forEach: The forEach() method executes a provided function once per each key/value pair in the Map object, in insertion order.
  • forEach: The forEach() method executes a provided function once per array element. This method has the same algorithm as Array.prototype.forEach(). TypedArray is one of the typed array types here.
  • forEach: The forEach() method executes a provided function once per each value in the Set object, in insertion order.
  • freeze: The Object.freeze() method freezes an object: that is, prevents new properties from being added to it; prevents existing properties from being removed; and prevents existing properties, or their enumerability, configurability, or writability, from being changed. In essence the object is made effectively immutable. The method returns the object being frozen.
  • from: The Array.from() method creates a new Array instance from an array-like or iterable object.
  • from: The TypedArray.from() method creates a new typed array from an array-like or iterable object. This method is nearly the same as Array.from().
  • fromCharCode: The static String.fromCharCode() method returns a string created by using the specified sequence of Unicode values.
  • fromCodePoint: The static String.fromCodePoint() method returns a string created by using the specified sequence of code points.
  • fround: The Math.fround() function returns the nearest single precision float representation of a number.

G

  • get: The get() method returns a specified element from a WeakMap object.
  • get: The handler.get() method is a trap for getting a property value.
  • get: The get() method returns a specified element from a Map object.
  • getDate: The getDate() method returns the day of the month for the specified date according to local time.
  • getDay: The getDay() method returns the day of the week for the specified date according to local time, where 0 represents Sunday.
  • getFloat32: The getFloat32() method gets a signed 32-bit float (float) at the specified byte offset from the start of the DataView.
  • getFloat64: The getFloat64() method gets a signed 64-bit float (double) at the specified byte offset from the start of the DataView.
  • getFullYear: The getFullYear() method returns the year of the specified date according to local time.
  • getHours: The getHours() method returns the hour for the specified date, according to local time.
  • getInt16: The getInt16() method gets a signed 16-bit integer (short) at the specified byte offset from the start of the DataView.
  • getInt32: The getInt32() method gets a signed 32-bit integer (long) at the specified byte offset from the start of the DataView.
  • getInt8: The getInt8() method gets a signed 8-bit integer (byte) at the specified byte offset from the start of the DataView.
  • getMilliseconds: The getMilliseconds() method returns the milliseconds in the specified date according to local time.
  • getMinutes: The getMinutes() method returns the minutes in the specified date according to local time.
  • getMonth: The getMonth() method returns the month in the specified date according to local time, as a zero-based value (where zero indicates the first month of the year).
  • getOwnPropertyDescriptor: The handler.getOwnPropertyDescriptor() method is a trap for Object.getOwnPropertyDescriptor().
  • getOwnPropertyDescriptor: The Object.getOwnPropertyDescriptor() method returns a property descriptor for an own property (that is, one directly present on an object, not present by dint of being along an object's prototype chain) of a given object.
  • getOwnPropertyNames: The Object.getOwnPropertyNames() method returns an array of all properties (enumerable or not) found directly upon a given object.
  • getOwnPropertySymbols: The Object.getOwnPropertySymbols() method returns an array of all symbol properties found directly upon a given object.
  • getPrototypeOf: The handler.getPrototypeOf() method is a trap for the [[GetPrototypeOf]] internal method.
  • getPrototypeOf: The Object.getPrototypeOf() method returns the prototype (i.e. the value of the internal [[Prototype]] property) of the specified object.
  • getSeconds: The getSeconds() method returns the seconds in the specified date according to local time.
  • getTime: The getTime() method returns the numeric value corresponding to the time for the specified date according to universal time.
  • getTimezoneOffset: The getTimezoneOffset() method returns the time-zone offset from UTC, in minutes, for the current locale.
  • getUTCDate: The getUTCDate() method returns the day (date) of the month in the specified date according to universal time.
  • getUTCDay: The getUTCDay() method returns the day of the week in the specified date according to universal time, where 0 represents Sunday.
  • getUTCFullYear: The getUTCFullYear() method returns the year in the specified date according to universal time.
  • getUTCHours: The getUTCHours() method returns the hours in the specified date according to universal time.
  • getUTCMilliseconds: The getUTCMilliseconds() method returns the milliseconds in the specified date according to universal time.
  • getUTCMinutes: The getUTCMinutes() method returns the minutes in the specified date according to universal time.
  • getUTCMonth: The getUTCMonth() returns the month of the specified date according to universal time, as a zero-based value (where zero indicates the first month of the year).
  • getUTCSeconds: The getUTCSeconds() method returns the seconds in the specified date according to universal time.
  • getUint16: The getUint16() method gets an unsigned 16-bit integer (unsigned short) at the specified byte offset from the start of the DataView.
  • getUint32: The getUint32() method gets an unsigned 32-bit integer (unsigned long) at the specified byte offset from the start of the DataView.
  • getUint8: The getUint8() method gets an unsigned 8-bit integer (unsigned byte) at the specified byte offset from the start of the DataView.
  • getYear: The getYear() method returns the year in the specified date according to local time. Because getYear() does not return full years ("year 2000 problem"), it is no longer used and has been replaced by the getFullYear() method.

H

  • has: The has() method returns a boolean indicating whether an element with the specified key exists or not.
  • has: The handler.has() method is a trap for the in operator.
  • has: The has() method returns a boolean indicating whether an element with the specified value exists in a Set object or not.
  • has: The has() method returns a boolean indicating whether an element with the specified key exists in the WeakMap object or not.
  • has: The has() method returns a boolean indicating whether an object exists in a WeakSet or not.
  • hasOwnProperty: The hasOwnProperty() method returns a boolean indicating whether the object has the specified property.
  • hypot: The Math.hypot() function returns the square root of the sum of squares of its arguments, that is

I

  • Indexed collections: An array is an ordered set of values that you refer to with a name and an index. For example, you could have an array called emp that contains employees' names indexed by their employee number. So emp[1] would be employee number one, emp[2] employee number two, and so on.
  • imul: The Math.imul() function returns the result of the C-like 32-bit multiplication of the two parameters.
  • includes: The includes() method determines whether an array includes a certain element, returning true or false as appropriate.
  • includes: The includes() method determines whether a typed array includes a certain element, returning true or false as appropriate. This method has the same algorithm as Array.prototype.includes(). TypedArray is one of the typed array types here.
  • includes: The includes() method determines whether one string may be found within another string, returning true or false as appropriate.
  • indexOf: The indexOf() method returns the index within the calling String object of the first occurrence of the specified value, starting the search at fromIndex. Returns -1 if the value is not found.
  • indexOf: The indexOf() method returns the first index at which a given element can be found in the array, or -1 if it is not present.
  • indexOf: The indexOf() method returns the first index at which a given element can be found in the typed array, or -1 if it is not present. This method has the same algorithm as Array.prototype.indexOf(). TypedArray is one of the typed array types here.
  • is: The Object.is() method determines whether two values are the same value.
  • isArray: The Array.isArray() method returns true if an object is an array, false if it is not.
  • isExtensible: The Object.isExtensible() method determines if an object is extensible (whether it can have new properties added to it).
  • isExtensible: The handler.isExtensible() method is a trap for Object.isExtensible().
  • isFinite: The Number.isFinite() method determines whether the passed value is a finite number.
  • isFrozen: The Object.isFrozen() determines if an object is frozen.
  • isGenerator: The isGenerator() method determines whether or not a function is a generator.
  • isInteger: The Number.isInteger() method determines whether the passed value is an integer.
  • isNaN: The Number.isNaN() method determines whether the passed value is NaN. More robust version of the original global isNaN().
  • isPrototypeOf: The isPrototypeOf() method tests for an object in another object's prototype chain.
  • isSafeInteger: The Number.isSafeInteger() method determines whether the provided value is a number that is a safe integer. A safe integer is an integer that
  • isSealed: The Object.isSealed() method determines if an object is sealed.
  • isView: The ArrayBuffer.isView() method returns true if arg is a view one of the ArrayBuffer views, such as typed array objects or a DataView; false otherwise.
  • italics: The italics() method creates an <i> HTML element that causes a string to be italic.

J

  • join: The join() method joins all elements of an array into a string.
  • join: The join() method joins all elements of an array into a string. This method has the same algorithm as Array.prototype.join(). TypedArray is one of the typed array types here.

K

  • keyFor: The Symbol.keyFor(sym) method retrieves a shared symbol key from the global symbol registry for the given symbol.
  • keys: The keys() method returns a new Array Iterator that contains the keys for each index in the array.
  • keys: The keys() method returns a new Iterator object that contains the keys for each element in the Map object in insertion order.
  • keys: The Object.keys() method returns an array of a given object's own enumerable properties, in the same order as that provided by a for...in loop (the difference being that a for-in loop enumerates properties in the prototype chain as well).
  • keys: The keys() method returns a new Array Iterator object that contains the keys for each index in the array.

L

  • lastIndexOf: The lastIndexOf() method returns the last index at which a given element can be found in the array, or -1 if it is not present. The array is searched backwards, starting at fromIndex.
  • lastIndexOf: The lastIndexOf() method returns the index within the calling String object of the last occurrence of the specified value, or -1 if not found. The calling string is searched backward, starting at fromIndex.
  • lastIndexOf: The lastIndexOf() method returns the last index at which a given element can be found in the typed array, or -1 if it is not present. The typed array is searched backwards, starting at fromIndex. This method has the same algorithm as Array.prototype.lastIndexOf(). TypedArray is one of the typed array types here.
  • link: The link() method creates an <a> HTML element that causes a string to be displayed as a hypertext link to another URL.
  • localeCompare: The localeCompare() method returns a number indicating whether a reference string comes before or after or is the same as the given string in sort order.
  • log: The Math.log() function returns the natural logarithm (base e) of a number, that is
  • log10: The Math.log10() function returns the base 10 logarithm of a number, that is
  • log1p: The Math.log1p() function returns the natural logarithm (base e) of 1 + a number, that is
  • log2: The Math.log2() function returns the base 2 logarithm of a number, that is

M

  • map: The map() method creates a new array with the results of calling a provided function on every element in this array.
  • map: The map() method creates a new typed array with the results of calling a provided function on every element in this typed array. This method has the same algorithm as Array.prototype.map(). TypedArray is one of the typed array types here.
  • match: The match() method retrieves the matches when matching a string against a regular expression.
  • max: The Math.max() function returns the largest of zero or more numbers.
  • min: The Math.min() function returns the smallest of zero or more numbers.
  • move: The move() method used to copy the sequence of array elements within the array to the position starting at target. However, this non-standard method has been replaced with the standard TypedArray.prototype.copyWithin() method. TypedArray is one of the typed array types here.

N

  • next: The next() method returns an object with two properties done and value. You can also provide a parameter to the next method to send a value to the generator.
  • normalize: The normalize() method returns the Unicode Normalization Form of a given string (if the value isn't a string, it will be converted to one first).
  • now: The Date.now() method returns the number of milliseconds elapsed since 1 January 1970 00:00:00 UTC.

O

  • observe: The Array.observe() method is used for asynchronously observing changes to Arrays, similar to Object.observe() for objects. It provides a stream of changes in order of occurrence. It's equivalent to Object.observe() invoked with the accept type list ["add", "update", "delete", "splice"].
  • observe: The Object.observe() method is used for asynchronously observing the changes to an object. It provides a stream of changes in the order in which they occur.
  • of: The Array.of() method creates a new Array instance with a variable number of arguments, regardless of number or type of the arguments.
  • of: The TypedArray.of() method creates a new typed array with a variable number of arguments. This method is nearly the same as Array.of().
  • ownKeys: The handler.ownKeys() method is a trap for Object.getOwnPropertyNames().

P

  • parse: The Date.parse() method parses a string representation of a date, and returns the number of milliseconds since January 1, 1970, 00:00:00 UTC.
  • parse: The JSON.parse() method parses a string as JSON, optionally transforming the value produced by parsing.
  • parseFloat: The Number.parseFloat() method parses a string argument and returns a floating point number. This method behaves identically to the global function parseFloat() and is part of ECMAScript 6 (its purpose is modularization of globals).
  • parseInt: The Number.parseInt() method parses a string argument and returns an integer of the specified radix or base.
  • pop: The pop() method removes the last element from an array and returns that element.
  • pow: The Math.pow() function returns the base to the exponent power, that is, baseexponent.
  • preventExtensions: The Object.preventExtensions() method prevents new properties from ever being added to an object (i.e. prevents future extensions to the object).
  • preventExtensions: The handler.preventExtensions() method is a trap for Object.preventExtensions().
  • propertyIsEnumerable: The propertyIsEnumerable() method returns a Boolean indicating whether the specified property is enumerable.
  • prototype[@@iterator]: The initial value of the @@iterator property is the same function object as the initial value of the entries property.
  • prototype[@@iterator]: The initial value of the @@iterator property is the same function object as the initial value of the values() property.
  • prototype[@@iterator]: The initial value of the @@iterator property is the same function object as the initial value of the values property.
  • prototype[@@iterator]: The [@@iterator]() method returns a new Iterator object that iterates over the code points of a String value, returning each code point as a String value.
  • prototype[@@iterator]: The initial value of the @@iterator property is the same function object as the initial value of the values property.
  • push: The push() method adds one or more elements to the end of an array and returns the new length of the array.

Q

  • quote: The non-standard quote() method returns a copy of the string, replacing various special characters in the string with their escape sequences and wrapping the result in double-quotes (").

R

  • race: The Promise.race(iterable) method returns a promise that resolves or rejects as soon as one of the promises in the iterable resolves or rejects, with the value or reason from that promise.
  • random: The Math.random() function returns a floating-point, pseudo-random number in the range [0, 1) that is, from 0 (inclusive) up to but not including 1 (exclusive), which you can then scale to your desired range. The implementation selects the initial seed to the random number generation algorithm; it cannot be chosen or reset by the user.
  • raw: The static String.raw() method is a tag function of template strings, like the r prefix in Python or the @ prefix in C# for string literals, this function is used to get the raw string form of template strings.
  • reduce: The reduce() method applies a function against an accumulator and each value of the array (from left-to-right) has to reduce it to a single value.
  • reduce: The reduce() method applies a function against an accumulator and each value of the typed array (from left-to-right) has to reduce it to a single value. This method has the same algorithm as Array.prototype.reduce(). TypedArray is one of the typed array types here.
  • reduceRight: The reduceRight() method applies a function against an accumulator and each value of the typed array (from right-to-left) has to reduce it to a single value. This method has the same algorithm as Array.prototype.reduceRight(). TypedArray is one of the typed array types here.
  • reduceRight: The reduceRight() method applies a function against an accumulator and each value of the array (from right-to-left) has to reduce it to a single value.
  • reject: The Promise.reject(reason) method returns a Promise object that is rejected with the given reason.
  • repeat: The repeat() method constructs and returns a new string which contains the specified number of copies of the string on which it was called, concatenated together.
  • replace: The replace() method returns a new string with some or all matches of a pattern replaced by a replacement. The pattern can be a string or a RegExp, and the replacement can be a string or a function to be called for each match.
  • resolve: The Promise.resolve(value) method returns a Promise object that is resolved with the given value. If the value is a thenable (i.e. has a then method), the returned promise will "follow" that thenable, adopting its eventual state; otherwise the returned promise will be fulfilled with the value.
  • resolvedOptions: The Intl.DateTimeFormat.prototype.resolvedOptions() method returns a new object with properties reflecting the locale and date and time formatting options computed during initialization of this DateTimeFormat object.
  • resolvedOptions: The Intl.Collator.prototype.resolvedOptions() method returns a new object with properties reflecting the locale and collation options computed during initialization of this Collator object.
  • resolvedOptions: The Intl.NumberFormat.prototype.resolvedOptions() method returns a new object with properties reflecting the locale and number formatting options computed during initialization of this NumberFormat object.
  • return: The return() method returns the given value and finishes the generator.
  • reverse: The reverse() method reverses a typed array in place. The first typed array element becomes the last and the last becomes the first. This method has the same algorithm as Array.prototype.reverse(). TypedArray is one of the typed array types here.
  • reverse: The reverse() method reverses an array in place. The first array element becomes the last and the last becomes the first.
  • revocable: The Proxy.revocable() method is used to create a revocable Proxy object.
  • round: The Math.round() function returns the value of a number rounded to the nearest integer.

S

  • seal: The Object.seal() method seals an object, preventing new properties from being added to it and marking all existing properties as non-configurable. Values of present properties can still be changed as long as they are writable.
  • search: The search() method executes a search for a match between a regular expression and this String object.
  • set: The set() method adds a new element with a specified key and value to a WeakMap object.
  • set: The set() method adds a new element with a specified key and value to a Map object.
  • set: The handler.set() method is a trap for setting a property value.
  • set: The set() method stores multiple values in the typed array, reading input values from a specified array.
  • setDate: The setDate() method sets the day of the month for a specified date according to local time.
  • setFloat32: The setFloat32() method stores a signed 32-bit float (float) value at the specified byte offset from the start of the DataView.
  • setFloat64: The setFloat64() method stores a signed 64-bit float (double) value at the specified byte offset from the start of the DataView.
  • setFullYear: The setFullYear() method sets the full year for a specified date according to local time.
  • setHours: The setHours() method sets the hours for a specified date according to local time, and returns the number of milliseconds since 1 January 1970 00:00:00 UTC until the time represented by the updated Date instance.
  • setInt16: The setInt16() method stores a signed 16-bit integer (short) value at the specified byte offset from the start of the DataView.
  • setInt32: The setInt32() method stores a signed 32-bit integer (long) value at the specified byte offset from the start of the DataView.
  • setInt8: The setInt8() method stores a signed 8-bit integer (byte) value at the specified byte offset from the start of the DataView.
  • setMilliseconds: The setMilliseconds() method sets the milliseconds for a specified date according to local time.
  • setMinutes: The setMinutes() method sets the minutes for a specified date according to local time.
  • setMonth: The setMonth() method sets the month for a specified date according to local time.
  • setPrototypeOf: The handler.setPrototypeOf() method is a trap for Object.setPrototypeOf().
  • setPrototypeOf: The Object.setPrototype() method sets the prototype (i.e., the internal [[Prototype]] property) of a specified object to another object or null.
  • setSeconds: The setSeconds() method sets the seconds for a specified date according to local time.
  • setTime: The setTime() method sets the Date object to the time represented by a number of milliseconds since January 1, 1970, 00:00:00 UTC.
  • setUTCDate: The setUTCDate() method sets the day of the month for a specified date according to universal time.
  • setUTCFullYear: The setUTCFullYear() method sets the full year for a specified date according to universal time.
  • setUTCHours: The setUTCHours() method sets the hour for a specified date according to universal time, and returns the number of milliseconds since 1 January 1970 00:00:00 UTC until the time represented by the updated Date instance.
  • setUTCMilliseconds: The setUTCMilliseconds() method sets the milliseconds for a specified date according to universal time.
  • setUTCMinutes: The setUTCMinutes() method sets the minutes for a specified date according to universal time.
  • setUTCMonth: The setUTCMonth() method sets the month for a specified date according to universal time.
  • setUTCSeconds: The setUTCSeconds() method sets the seconds for a specified date according to universal time.
  • setUint16: The setUint16() method stores an unsigned 16-bit integer (unsigned short) value at the specified byte offset from the start of the DataView.
  • setUint32: The setUint32() method stores an unsigned 32-bit integer (unsigned long) value at the specified byte offset from the start of the DataView.
  • setUint8: The setUint8() method stores an unsigned 8-bit integer (byte) value at the specified byte offset from the start of the DataView.
  • setYear: The setYear() method sets the year for a specified date according to local time. Because setYear() does not set full years ("year 2000 problem"), it is no longer used and has been replaced by the setFullYear() method.
  • shift: The shift() method removes the first element from an array and returns that element. This method changes the length of the array.
  • sign: The Math.sign() function returns the sign of a number, indicating whether the number is positive, negative or zero.
  • sin: The Math.sin() function returns the sine of a number.
  • sinh: The Math.sinh() function returns the hyperbolic sine of a number, that can be expressed using the constant e:
  • slice: The slice() method returns a shallow copy of a portion of a typed array into a new typed array object. This method has the same algorithm as Array.prototype.slice(). TypedArray is one of the typed array types here.
  • slice: The slice() method extracts a section of a string and returns a new string.
  • slice: The slice() method returns a new ArrayBuffer whose contents are a copy of this ArrayBuffer's bytes from begin, inclusive, up to end, exclusive.
  • slice: The slice() method returns a shallow copy of a portion of an array into a new array object.
  • small: The small() method creates a <small> HTML element that causes a string to be displayed in a small font.
  • some: The some() method tests whether some element in the typed array passes the test implemented by the provided function. This method has the same algorithm as Array.prototype.some(). TypedArray is one of the typed array types here.
  • some: The some() method tests whether some element in the array passes the test implemented by the provided function.
  • sort: The sort() method sorts the elements of an array in place and returns the array. The sort is not necessarily stable. The default sort order is according to string Unicode code points.
  • splice: The splice() method changes the content of an array by removing existing elements and/or adding new elements.
  • split: The split() method splits a String object into an array of strings by separating the string into substrings.
  • sqrt: The Math.sqrt() function returns the square root of a number, that is
  • startsWith: The startsWith() method determines whether a string begins with the characters of another string, returning true or false as appropriate.
  • strike: The strike() method creates a <strike> HTML element that causes a string to be displayed as struck-out text.
  • stringify: The JSON.stringify() method converts a JavaScript value to a JSON string, optionally replacing values if a replacer function is specified, or optionally including only the specified properties if a replacer array is specified.
  • sub: The sub() method creates a <sub> HTML element that causes a string to be displayed as subscript.
  • subarray: The subarray() method returns a new TypedArray on the same ArrayBuffer store and with the same element types as for this TypedArray object. The begin offset is inclusive and the end offset is exclusive. TypedArray is one of the typed array types.
  • substr: The substr() method returns the characters in a string beginning at the specified location through the specified number of characters.
  • substring: The substring() method returns a subset of a string between one index and another, or through the end of the string.
  • sup: The sup() method creates a <sup> HTML element that causes a string to be displayed as superscript.
  • supportedLocalesOf: The Intl.Collator.supportedLocalesOf() method returns an array containing those of the provided locales that are supported in collation without having to fall back to the runtime's default locale.
  • supportedLocalesOf: The Intl.DateTimeFormat.supportedLocalesOf() method returns an array containing those of the provided locales that are supported in date and time formatting without having to fall back to the runtime's default locale.
  • supportedLocalesOf: The Intl.NumberFormat.supportedLocalesOf() method returns an array containing those of the provided locales that are supported in number formatting without having to fall back to the runtime's default locale.

T

  • tan: The Math.tan() function returns the tangent of a number.
  • tanh: The Math.tanh() function returns the hyperbolic tangent of a number, that is
  • test: The test() method executes a search for a match between a regular expression and a specified string. Returns true or false.
  • then: The then() method returns a Promise. It takes two arguments, both are callback functions for the success and failure cases of the Promise.
  • throw: The throw() method throws an error to a generator.
  • toDateString: The toDateString() method returns the date portion of a Date object in human readable form in American English.
  • toExponential: The toExponential() method returns a string representing the Number object in exponential notation
  • toFixed: The toFixed() method formats a number using fixed-point notation.
  • toGMTString: The toGMTString() method converts a date to a string, using Internet Greenwich Mean Time (GMT) conventions. The exact format of the value returned by toGMTString() varies according to the platform and browser, in general it should represent a human readable date string.
  • toISOString: The toISOString() method returns a string in simplified extended ISO format (ISO 8601), which is always 24 characters long: YYYY-MM-DDTHH:mm:ss.sssZ. The timezone is always zero UTC offset, as denoted by the suffix "Z".
  • toInteger: The Number.toInteger() method used to evaluate the passed value and convert it to an integer, but its implementation has been removed.
  • toJSON: The toJSON() method returns a string representation of the Date object.
  • toLocaleDateString: The toLocaleDateString() method returns a string with a language sensitive representation of the date portion of this date. The new locales and options arguments let applications specify the language whose formatting conventions should be used and allow to customize the behavior of the function. In older implementations, which ignore the locales and options arguments, the locale used and the form of the string returned are entirely implementation dependent.
  • toLocaleFormat: The non-standard toLocaleFormat() method converts a date to a string using the specified formatting. Intl.DateTimeFormat is an alternative to format dates in a standards-compliant way. See also the newer version of Date.prototype.toLocaleDateString().
  • toLocaleLowerCase: The toLocaleLowerCase() method returns the calling string value converted to lower case, according to any locale-specific case mappings.
  • toLocaleString: The toLocaleString() method returns a string with a language sensitive representation of this date. The new locales and options arguments let applications specify the language whose formatting conventions should be used and customize the behavior of the function. In older implementations, which ignore the locales and options arguments, the locale used and the form of the string returned are entirely implementation dependent.
  • toLocaleString: The toLocaleString() method returns a string representing the object. This method is meant to be overriden by derived objects for locale-specific purposes.
  • toLocaleString: The toLocaleString() method returns a string representing the elements of the array. The elements are converted to Strings using their toLocaleString methods and these Strings are separated by a locale-specific String (such as a comma “,”).
  • toLocaleString: The toLocaleString() method returns a string with a language sensitive representation of this number.
  • toLocaleTimeString: The toLocaleTimeString() method returns a string with a language sensitive representation of the time portion of this date. The new locales and options arguments let applications specify the language whose formatting conventions should be used and customize the behavior of the function. In older implementations, which ignore the locales and options arguments, the locale used and the form of the string returned are entirely implementation dependent.
  • toLocaleUpperCase: The toLocaleUpperCase() method returns the calling string value converted to upper case, according to any locale-specific case mappings.
  • toLowerCase: The toLowerCase() method returns the calling string value converted to lowercase.
  • toPrecision: The toPrecision() method returns a string representing the Number object to the specified precision.
  • toSource: The toSource() method returns a string representing the source code of the object.
  • toSource: The toSource() method returns code that could eval to the same error.
  • toSource: The toSource() method returns a string representing the source code of the object.
  • toSource: The toSource() method returns a string representing the source code of the object.
  • toSource: The toSource() method returns a string representing the source code of the object.
  • toSource: The toSource() method returns a string representing the source code of the object.
  • toSource: The toSource() method returns a string representing the source code of the object.
  • toSource: The toSource() method returns a string representing the source code of the object.
  • toSource: The toSource() method returns a string representing the source code of the array.
  • toSource: The toSource() method returns a string representing the source code of the object.
  • toString: The toString() method returns a string representing the specified array and its elements.
  • toString: The toString() method returns a string representing the specified Error object.
  • toString: The toString() method returns a string representing object.
  • toString: The toString() method returns a string representing the specified Boolean object.
  • toString: The toString() method returns a string representing the source code of the function.
  • toString: The toString() method returns a string representing the specified Date object.
  • toString: The toString() method returns a string representing the regular expression.
  • toString: The toString() method returns a string representing the specified object.
  • toString: The toString() method returns a string representing the specified Number object.
  • toString: The toString() method returns a string representing the specified Symbol object.
  • toTimeString: The toTimeString() method returns the time portion of a Date object in human readable form in American English.
  • toUTCString: The toUTCString() method converts a date to a string, using the UTC time zone.
  • toUpperCase: The toUpperCase() method returns the calling string value converted to uppercase.
  • transfer: The static ArrayBuffer.transfer() method returns a new ArrayBuffer whose contents are taken from the oldBuffer's data and then is either truncated or zero-extended by newByteLength. If newByteLength is undefined, the byteLength of the oldBuffer is used. This operation leaves oldBuffer in a detached state.
  • trim: The trim() method removes whitespace from both ends of a string. Whitespace in this context is all the whitespace characters (space, tab, no-break space, etc.) and all the line terminator characters (LF, CR, etc.).
  • trimLeft: The trimLeft() removes whitespace from the left end of the string.
  • trimRight: The trimRight() method removes whitespace from the right end of the string.
  • trunc: The Math.trunc() function returns the integral part of a number by removing any fractional digits.

U

  • UTC: The Date.UTC() method accepts the same parameters as the longest form of the constructor, and returns the number of milliseconds in a Date object since January 1, 1970, 00:00:00, universal time.
  • unshift: The unshift() method adds one or more elements to the beginning of an array and returns the new length of the array.
  • unwatch: The unwatch() method removes a watchpoint set with the watch() method.

V

  • valueOf: The valueOf() method returns the primitive value of a Boolean object.
  • valueOf: The valueOf() method returns the primitive value of a Date object.
  • valueOf: The valueOf() method returns the wrapped primitive value of a Number object.
  • valueOf: The valueOf() method returns the primitive value of the specified object.
  • valueOf: The valueOf() method returns the primitive value of a String object.
  • valueOf: The valueOf() method returns the primitive value of a Symbol object.
  • values: The values() method returns a new Array Iterator object that contains the values for each index in the array.
  • values: The values() method returns a new Iterator object that contains the values for each element in the Map object in insertion order.
  • values: The values() method returns a new Iterator object that contains the values for each element in the Set object in insertion order.
  • values: The values() method returns a new Array Iterator object that contains the values for each index in the array.

W

  • watch: The watch() method watches for a property to be assigned a value and runs a function when that occurs.

X

Y

Z

_

  • __defineGetter__: The __defineGetter__ method binds an object's property to a function to be called when that property is looked up.
  • __defineSetter__: The __defineSetter__ method binds an object's property to a function to be called when an attempt is made to set that property.
  • __lookupGetter__: The __lookupGetter__ method returns the function bound as a getter to the specified property.
  • __lookupSetter__: The __lookupSetter__ method returns the function bound as a setter to the specified property.
 

参见

文档标签和贡献者

标签: 
 此页面的贡献者: 456wyc
 最后编辑者: 456wyc,