Share via


JScript Methods (Windows Scripting - JScript)

 

The following table lists JScript Methods.

Note

These topics include information about JScript 5.8 and earlier. For current JavaScript language features, see JavaScript for Internet Explorer.

Methods

Description

Language Element

Returns the absolute value of a number.

abs Method

Returns the arccosine of a number.

acos Method

Places an HTML anchor with a NAME attribute around specified text in the object.

anchor Method

Applies a method of an object, substituting another object for the current object.

apply Method

Returns the arcsine of a number.

asin Method

Returns the arctangent of a number.

atan Method

Returns the angle (in radians) from the X axis to a point (y,x).

atan2 Method

Returns a Boolean value indicating if the enumerator is at the end of the collection.

atEnd Method

Places HTML <BIG> tags around text in a String object.

big Method

Places HTML <BLINK> tags around text in a String object.

blink Method

Places HTML <B> tags around text in a String object.

bold Method

Calls a method of an object, substituting another object for the current object.

call Method

Returns the smallest integer greater than or equal to its numeric argument.

ceil Method

Returns the character at the specified index.

charAt Method

Returns the Unicode encoding of the specified character.

charCodeAt Method

Compiles a regular expression into an internal format.

compile Method

Returns a new array consisting of a combination of two arrays.

concat Method (Array)

Returns a String object containing the concatenation of two supplied strings.

concat Method (String)

Returns the cosine of a number.

cos Method

Returns the unencoded version of an encoded Uniform Resource Identifier.

decodeURI Method

Returns the unencoded version of an encoded component of a Uniform Resource Identifier.

decodeURIComponent Method

Adds a property to an existing Document Object Model (DOM) object.

defineProperty Method

Returns the number of dimensions in a VBArray.

dimensions Method

Encodes a text string as a valid Uniform Resource Identifier.

encodeURI Method

Encodes a text string as a valid component of a Uniform Resource Identifier.

encodeURIComponent Method

Encodes String objects so they can be read on all computers.

escape Method

Evaluates JScript code and executes it.

eval Method

Executes a search for a match in a specified string.

exec Method

Returns e (the base of natural logarithms) raised to a power.

exp Method

Places HTML <TT> tags around text in a String object.

fixed Method

Returns the greatest integer less than or equal to its numeric argument.

floor Method

Places an HTML <FONT> tag with the COLOR attribute around the text in a String object.

fontcolor Method

Places an HTML <FONT> tag with the SIZE attribute around the text in a String object.

fontsize Method

Returns a string from a number of Unicode character values.

fromCharCode Method

Returns the day of the month value in a Date object using local time.

getDate Method

Returns the day of the week value in a Date object using local time.

getDay Method

Returns the year value in the Date object using local time.

getFullYear Method

Returns the hours value in a Date object using local time.

getHours Method

Returns the item at the specified location.

getItem Method

Returns the milliseconds value in a Date object using local time.

getMilliseconds Method

Returns the minutes value stored in a Date object using local time.

getMinutes Method

Returns the month value in the Date object using local time.

getMonth Method

Returns the property definition of a DOM property.

getOwnPropertyDescriptor Method

Returns seconds value stored in a Date object using local time.

getSeconds Method

Returns the time value in a Date object.

getTime Method

Returns the difference in minutes between the time on the host computer and Universal Coordinated Time (UTC).

getTimezoneOffset Method

Returns the date value in a Date object using Universal Coordinated Time (UTC).

getUTCDate Method

Returns the day of the week value in a Date object using Universal Coordinated Time (UTC).

getUTCDay Method

Returns the year value in a Date object using Universal Coordinated Time (UTC).

getUTCFullYear Method

Returns the hours value in a Date object using Universal Coordinated Time (UTC).

getUTCHours Method

Returns the milliseconds value in a Date object using Universal Coordinated Time (UTC).

getUTCMilliseconds Method

Returns the minutes value in a Date object using Universal Coordinated Time (UTC).

getUTCMinutes Method

Returns the month value in a Date object using Universal Coordinated Time (UTC).

getUTCMonth Method

Returns the seconds value in a Date object using Universal Coordinated Time (UTC).

getUTCSeconds Method

Returns the VT_DATE value in a Date object.

getVarDate Method

Returns the year value in a Date object.

getYear Method

Returns a Boolean value indicating whether an object has a property with the specified name.

hasOwnProperty Method

Returns the character position where the first occurrence of a substring occurs within a String object.

indexOf Method

Returns a Boolean value that indicates if a supplied number is finite.

isFinite Method

Returns a Boolean value that indicates whether a value is the reserved value NaN (not a number).

isNaN Method

Returns a Boolean value indicating whether an object exists in another object's prototype chain.

isPrototypeOf Method

Places HTML <I> tags around text in a String object.

italics Method

Returns the current item in the collection.

item Method

Returns a String object consisting of all the elements of an array concatenated together.

join Method

Returns the last occurrence of a substring within a String object.

lastIndexOf Method

Returns the lowest index value used in the specified dimension of a VBArray.

lbound Method

Places an HTML anchor with an HREF attribute around the text in a String object.

link Method

Returns a value indicating whether two strings are equivalent in the current locale.

localeCompare Method

Returns the natural logarithm of a number.

log Method

Returns, as an array, the results of a search on a string using a supplied Regular Expression object.

match Method

Returns the greater of two supplied numeric expressions.

max Method

Returns the lesser of two supplied numbers.

min Method

Resets the current item in the collection to the first item.

moveFirst Method

Moves the current item to the next item in the collection.

moveNext Method

Parses a string containing a date, and returns the number of milliseconds between that date and midnight, January 1, 1970.

Date.parse Method

De-serializes JSON text to produce an in-memory object or array.

JSON.parse Method

Returns a floating-point number converted from a string.

parseFloat Method

Returns an integer converted from a string.

parseInt Method

Removes the last element from an array and returns it.

pop Method

Returns the value of a base expression raised to a specified power.

pow Method

Appends new elements to an array, and returns the new length of the array.

push Method

Returns a pseudorandom number between 0 and 1.

random Method

Returns a copy of a string with text replaced using a regular expression.

replace Method

Returns an Array object with the elements reversed.

reverse Method

Returns a specified numeric expression rounded to the nearest integer.

round Method

Returns the position of the first substring match in a regular expression search.

search Method

Sets the numeric date of the Date object using local time.

setDate Method

Sets the year value in the Date object using local time.

setFullYear Method

Sets the hour value in the Date object using local time.

setHours Method

Sets the milliseconds value in the Date object using local time.

setMilliseconds Method

Sets the minutes value in the Date object using local time.

setMinutes Method

Sets the month value in the Date object using local time.

setMonth Method

Sets the seconds value in the Date object using local time.

setSeconds Method

Sets the date and time value in the Date object.

setTime Method

Sets the numeric date in the Date object using Universal Coordinated Time (UTC).

setUTCDate Method

Sets the year value in the Date object using Universal Coordinated Time (UTC).

setUTCFullYear Method

Sets the hours value in the Date object using Universal Coordinated Time (UTC).

setUTCHours Method

Sets the milliseconds value in the Date object using Universal Coordinated Time (UTC).

setUTCMilliseconds Method

Sets the minutes value in the Date object using Universal Coordinated Time (UTC).

setUTCMinutes Method

Sets the month value in the Date object using Universal Coordinated Time (UTC).

setUTCMonth Method

Sets the seconds value in the Date object using Universal Coordinated Time (UTC).

setUTCSeconds Method

Sets the year value in the Date object.

setYear Method

Removes the first element from an array and returns it.

shift Method

Returns the sine of a number.

sin Method

Returns a section of an array.

slice Method (Array)

Returns a section of a string.

slice Method (String)

Places HTML <SMALL> tags around text in a String object.

small Method

Returns an Array object with the elements sorted.

sort Method

Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.

splice Method

Returns the array of strings that results when a string is separated into substrings.

split Method

Returns the square root of a number.

sqrt Method

Places HTML <STRIKE> tags around text in a String object.

strike Method

Serializes an object or array into JavaScript Object Notation (JSON) text.

JSON.stringify Method

Places HTML <SUB> tags around text in a String object.

sub Method

Returns a substring beginning at a specified location and having a specified length.

substr Method

Returns the substring at a specified location within a String object.

substring Method

Places HTML <SUP> tags around text in a String object.

sup Method

Returns the tangent of a number.

tan Method

Returns a Boolean value that indicates whether or not a pattern exists in a searched string.

test Method

Returns a standard JScript array converted from a VBArray.

toArray Method

Returns a date as a string value.

toDateString Method

Returns a string containing a number represented in exponential notation.

toExponential Method

Returns a string representing a number in fixed-point notation.

toFixed Method

Returns a date converted to a string using Greenwich Mean Time (GMT).

toGMTString Method

Used to transform data of an object type before the JSON serialization.

toJSON Method

Returns a date as a string value appropriate to the host environment's current locale.

toLocaleDateString Method

Returns a string where all alphabetic characters have been converted to lowercase, taking into account the host environment's current locale.

toLocaleLowerCase Method

Returns a date converted to a string using the current locale.

toLocaleString Method

Returns a time as a string value appropriate to the host environment's current locale.

toLocaleTimeString Method

Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.

toLocaleUpperCase Method

Returns a string where all alphabetic characters have been converted to lowercase.

toLowerCase Method

Returns a string containing a number represented either in exponential or fixed-point notation with a specified number of digits.

toPrecision Method

Returns a string representation of an object.

toString Method

Returns a time as a string value.

toTimeString Method

Returns a string where all alphabetic characters have been converted to uppercase.

toUpperCase Method

Returns a date converted to a string using Universal Coordinated Time (UTC).

toUTCString Method

Returns the highest index value used in the specified dimension of the VBArray.

ubound Method

Decodes String objects encoded with the escape method.

unescape Method

Inserts new elements at the start of an array.

unshift Method

Returns the number of milliseconds between midnight, January 1, 1970 Universal Coordinated Time (UTC) (or GMT) and the supplied date.

UTC Method

Returns the primitive value of the specified object.

valueOf Method

Sends strings to the script debugger.

write Method

Sends strings to the script debugger, followed with a newline character.

writeln Method

Change History

Date

History

Reason

March 2009

Added defineProperty and getOwnPropertyDescriptor methods.

Information enhancement.

March 2009

Added JSON prefix to parse and stringify methods.

Content bug fix.

March 2009

Modified description of unshift method.

Content bug fix.

August 2008

Added JSON information.

Information enhancement.