Recently, when I was studying JavaScript and Java as a domain chain that contains global information, I recorded common global attributes and methods. This is the accumulation of knowledge, not all of which are listed, for details, refer to the API documentation related to JS.
Common global attributes:
Global attributes |
Function |
Infinity |
Positive infinity Value |
NaN |
Non-numeric value |
Undefined |
Undefined Value |
Common global methods:
Global Method |
Function |
EncodeURI () |
Returns a copy of the parameter. Some characters are replaced by hexadecimal escape sequences. We recommend that you use encodeURIComponent () |
EncodeURIComponent () |
Returns a copy of the parameter. Some characters are replaced by hexadecimal escape sequences. |
DecodeURI () |
Decodes strings escaped by encodeURI (). |
DecodeURIComponent () |
Decodes strings escaped by encodeURIComponent (). |
Escape () |
Use escape sequence to replace certain characters for string Encoding |
Unescape () |
Decodes a string encoded with escape (). |
Eval () |
Calculate the Javascript code string and return the result |
IsFinite () |
Checks whether a value is an infinite number. |
IsNaN () |
Checks whether a value is a non-numeric value. |
ParseInt () |
Parses an integer from a string. |
ParseFloat () |
Parses a decimal number from a string. |