如何将JavaScript代码注入iframe? [英] how to inject the javascript code into iframe?

查看:171
本文介绍了如何将JavaScript代码注入iframe?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个iframe(src是google.com)..我想注入JavaScript代码来查找iframe中存在的iframe中的锚标签列表,以便从iframe中获取iframe.Is是否可以注入代码?

I have an iframe(src is google.com)..I want to inject the javascript code for find the list of anchor tags present in the iframe from parent to iframe.Is it possible to inject the code?

谢谢。

推荐答案

由于同源策略, 。

请参阅 http://en.wikipedia .org / wiki / Same_origin_policy

由于您无法访问Google的服务器配置,因此您在这里找不到任何帮助:
避开同源政策的方法

And because you do not have access the Google's server configuration, you won't find any help here either: Ways to circumvent the same-origin policy .

这篇关于如何将JavaScript代码注入iframe?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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