如何在iframe中的p元素添加点击事件(使用jQuery) [英] How to add a click event to p elements in iframe (using jQuery)

查看:87
本文介绍了如何在iframe中的p元素添加点击事件(使用jQuery)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在iframe(使用jQuery)中的< p> 元素添加点击事件

How to add a click event to <p> elements in iframe (using jQuery)

<iframe frameborder="0" id="oframe" src="iframe.html" width="100%" name="oframe">


推荐答案

有一个特殊的jQuery函数: href =http://api.jquery.com/contents/ =noreferrer> .contents() 。看一下它的工作原理。

There's a special jQuery function that does that: .contents(). See the example for how it's works.

这篇关于如何在iframe中的p元素添加点击事件(使用jQuery)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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