Globální reference JavaScriptu
Globální vlastnosti a metody JavaScriptu lze použít se všemi objekty JavaScriptu.
Globální metody JavaScriptu
Function | Description |
---|---|
decodeURI() | Decodes a URI |
decodeURI Component() |
Decodes a URI component |
encodeURI() | Encodes a URI |
encodeURI Component() |
Encodes a URI component |
escape() | Deprecated. Use instead: encodeURI() encodeURIComponent() |
eval() | Evaluates a string and executes it as if it was script code |
isFinite() | Determines whether a value is a finite, legal number |
isNaN() | Determines whether a value is an illegal number |
Number() | Converts an object's value to a number |
parseFloat() | Parses a string and returns a floating point number |
parseInt() | Parses a string and returns an integer |
String() | Converts an object's value to a string |
unescape() | Deprecated. Use instead: decodeURI() decodeURIComponent() |
Globální vlastnosti JavaScriptu
Property | Description |
---|---|
Infinity | A numeric value that represents positive/negative infinity |
NaN | "Not-a-Number" value |
undefined | Indicates that a variable has not been assigned a value |
Poznámka
Protože tyto metody jsou globální a globálním objektem je okno prohlížeče, jsou tyto metody ve skutečnosti metodami okna:
isNaN() je totéž jako window.isNaN().