Cross-origin Summary of javascript: Cross-Origin data transfer using window. name _ javascript skills

Source: Internet
Author: User
This article introduces the cross-Origin data transmission implemented by window. name. It is very useful for you to practice it yourself. I would like to share with you the script home website for your reference. It is really useful. The specific implementation method is recorded as follows:

There are three pages:

A.com/app.html:application page.
A.com/proxy.html:the proxy file is generally an HTML file without any content, and its contents and application pages are in the same domain.
B .com/data.html:the page where data is obtained from the application page, which can be called the data page.

The basic steps are as follows:

Create an iframe in the application page (a.com/app.html) and point its src to the data page (B .com/data.html ).
The data page will append the data to the temporary nameof the iframe. the data.html code is as follows:

  
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.