Resolve Easyui Tabs The href cannot jump across domains

Source: Internet
Author: User

<! DOCTYPE html>

Tabs loading page is divided into two ways

HREF-mode loading data features:

    1. The loaded page is only loaded with the contents of the inside of the body element, which is just the HTML fragment of jquery's Ajax request.
    2. There is a matte effect when loading a remote URL, which is the "waiting ..." effect, and the user experience is better.
    3. When loading the page layout is more complex, or there are more JS scripts need to run, coding often need to be cautious, prone to problems, will be discussed in detail later
      Content-Mode loading data features:
    1. More flexible, you can spell the HTML code in the script and then assign the content property to the tab, but this will make the code easier to read.
    2. You can assign an IFRAME to content and embed an IFRAME with nothing to complete.
    3. The use of IFRAME will cause the client JS repeatedly loading, wasting resources, such as your home page to reference Easyui Library, your IFrame also to reference, waste generated.

In the Code Blue font (href: ' www.baidu.com ',), Easyui can not load the content of Baidu website, for other sites try also not. The reason is that when the browser in the Ajex jump, in order to ensure server security and data security, the browser will prohibit cross-domain AJEX requests. To make an analogy: a page of a website is you write some JS, these JS some Ajax operation
If a user accesses this page, your JS can get some information about the user (cookies, local files, etc.) and then send it back to your server via Ajax. So you can get whatever data you want to get. The existence of AJEX is itself a simplification of requests and constant refreshes, and disabling cross-domains can guarantee the security of AJEX users. Therefore Easyui in the href, Ajex cross-domain requests are also prohibited. But not that the content you want to load other domain names cannot be implemented. You can use the content loading method. Replace the blue text with the following:

Content: ' <iframe src= ' + URL + ' "frameborder=0 height=100% width=100% scrolling=no></iframe> 'where URLs can be replaced by any URL.

Problem:

1.tabs is the sub-class of the Panel, tabs relies on the panel, then why the 64-line part can not be changed: I hope you will advise

Console.dir (Taball[i].tabs (' Options '));

Resolve Easyui Tabs The href cannot jump across domains

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.