更改iframe的内容 [英] Changing the contents of an iframe

查看:87
本文介绍了更改iframe的内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的网页上嵌入了iframe,我想使用javascript编辑它的某些部分。这是可能的,我该怎么做?

I have an iframe embedded on my webpage and I'd like to edit certain parts of it using javascript. Is this possible and how would I do it?

推荐答案

因为iframe正在加载来自另一个域的内容 - 没有。您将点击同源政策。

Since the iframe is loading content from another domain — no. You'll hit the same origin policy.

这篇关于更改iframe的内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆