Built-in objects

Source: Internet
Author: User

First, global objects

The global (Global) object is a special object in ECMAScript because the object does not exist. (The Web browser implements global as part of the Window object)

The global object has some built-in properties and methods:

1. Uri Encoding method

The URI encoding can encode the link for sending to the browser. They replace the invalid characters with a special UTF-8 encoding, which allows the browser to accept and understand.

encodeURI () does not encode special characters that belong to URIs, such as colons, forward slashes, question marks, and # numbers

encodeURIComponent () encodes any non-standard characters it discovers (using a higher frequency because the encoding is more thorough)

After using the URI encoding, it can also be decoded by:

decodeURI () and decodeURIComponent () to decode

2. Eval () method

The eval () method acts primarily as a string parser, accepting only one parameter, which is the string of JavaScript code that executes.

Built-in objects

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.