Jquery捕获单击Iframe [英] Jquery capture Click on Iframe

查看:130
本文介绍了Jquery捕获单击Iframe的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我的页面上有一个iframe

So I have an Iframe on my page like

<iframe width="640" height="360" frameborder="0" allowfullscreen="" src="http://www.youtube.com/xxxxxx">

我想知道如何捕获点击事件。 Iframe没有设置id或类

I was wondering how I could capture the click event on this. The Iframe's do not have an id or class set on them

推荐答案

您无法与不在同一域下的iframe交互。浏览器的策略始终阻止这种情况。

You can not interact with iframes which are not under the same domain. This is always prevented by the browser's policy.

请参阅检测点击进入iframe使用JavaScript

这篇关于Jquery捕获单击Iframe的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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