Home >Web Front-end >JS Tutorial >Commonly used global properties and methods in JavaScript

Commonly used global properties and methods in JavaScript

高洛峰
高洛峰Original
2016-11-28 11:18:121326browse

Recently, I am learning JavaScript. The Java scope chain includes the global world. Recording the commonly used global attributes and methods is regarded as the accumulation of knowledge. Not all are listed. If you want to view them all, you can refer to the JS-related API documentation.性 Commonly used global attributes:

global attributes

INFINITY indicates that the numeric value of the positive infinite
Non -Digital value
Undefined Unexpicious Value


Commonly used global methods:

Ancharting , some characters are replaced by hexadecimal escape sequences, it is recommended to use encodeURIComponent()

encodeURIComponent() to return a copy of the parameters, some characters are replaced by hexadecimal escape sequences
decodeURI() for encodeURI () Escaped string decoding
decodeURIComponent() Decoding encodeURIComponent() escaped string
escape() String encoding by replacing certain characters with escape sequences
unescape() For characters encoded with escape() String decoding
eval() Calculate the Javascript code string and return the result
isFinite() Check whether a value is an infinite number
isNaN() Check whether a value is a non-numeric value
parseInt() Parse an integer from a string
parseFloat( ) Parse a decimal from a string



Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn