Common global attributes and methods of 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 attribute function
Infinity indicates the positive Infinity value.
NaN non-numeric value
Undefined Value


Common global methods:
Role of the Global Method
EncodeURI () returns a copy of the parameter. Some characters are replaced by the hexadecimal escape sequence. We recommend that you use encodeURIComponent ()
EncodeURIComponent () returns a copy of the parameter. Some characters are replaced by hexadecimal escape sequences.
DecodeURI () decodes the string escaped by encodeURI ()
DecodeURIComponent () decodes the string escaped by encodeURIComponent ()
Escape () uses escape sequences to replace certain characters for string encoding.
Unescape () decoding of strings encoded with escape ()
Eval () calculates the Javascript code string and returns 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 the 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.