当前位置: 动力学知识库 > 问答 > 编程问答 >

javascript - Embed external website inside a page

问题描述:

I'd like to load something from website B into a page on website A and contain the functionality of website B within a container on website A.

I tried doing this using a div and jQuery's load() method but I run into cross-domain-scripting issues (I think, it works with a local file but not a remote URL).

I also tried using an iframe but strange things happen (for example, when a link is clicked in the "contained" website B, it reloads the entire browser, losing the content of website A).

I've read about some server-side ways of handling this (and it may just come to that) but ideally I want something completely client side, JavaScript and HTML.

Any ideas?

网友答案:

Do you have any contact or privileges to the content of website B? I don't think this is legal.

Contacting the authors of website B isn't an option to work out some agreement?

More info on website copyright

网友答案:

What you are explaining ......... it looks like the site has XSS validations for attack....... I am not sure if you are aware about the seriousness of this iframe trick but it is one of the ways in which Phishing is done.

So please be aware and careful of what you are doing

分享给朋友:
您可能感兴趣的文章:
随机阅读: