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

html - load specific div from external website in another domain into iframe

问题描述:

I've seen there are several ways to do it WHEN the websites are in the same domain, but this is not my case and, since I'm much more a designer than a programmer, I'd go as far as to ask for the simplest, most straight-forward process.

网友答案:

The best way to do this would be to use a server-side script to parse the remote site, thereby degrading gracefully if there's any Javascript problems on the client-side and giving you control over the environment when you're parsing the remote site.

You could, e.g. write a php script to return just the relevant div, and then point the iframe straight at that.

What language / framework were you thinking of using?

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