Common global attributes and method record accumulation in JavaScript

Source: Internet
Author: User

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.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.