Global objects
The properties of the global object can be used directly.
When the JavaScript interpreter starts or any web browser loads a new page, it creates a new global object and gives it a defined set of initial properties:
constructors |
description |
date |
Date object |
RegExp |
Regular Expression Object |
string |
string Object |
Object |
Object Object |
Array |
object |
global object |
description |
Math |
Math class calculation |
json |
JSON |
Global Functions |
Description |
decodeURI () |
Decodes the URI of an encoding. |
decodeURIComponent () |
Decodes a coded URI component. |
encodeURI () |
Encodes a string as a URI. |
encodeURIComponent () |
Encodes a string as a URI component. |
Escape () |
Encodes a string. |
Eval () |
Computes the JavaScript string and executes it as script code. |
GetClass () |
Returns the Javaclass of a javaobject. |
Isfinite () |
Checks if a value is a number that has a poor size. |
IsNaN () |
Checks whether a value is a number. |
Number () |
Converts the value of an object to a number. |
Parsefloat () |
Parses a string and returns a floating-point number. |
parseint () |
Parses a string and returns an integer. |
String () |
Converts the value of an object to a string. |
Unescape () |
Decodes a string encoded by escape (). |
Global Properties |
Description |
Infinity |
Represents the numeric value of the positive infinity. |
Java |
Represents a javapackage at the Java.* package level. |
NaN |
Indicates whether a value is a numeric value. |
Packages |
The root Javapackage object. |
Undefined |
Indicates a value that is not defined. |
The Window object acts as a global object in the JavaScript client.
JavaScript Basic Learning-javascript authoritative Guide-3.5 global objects