在这里,我在点击该 iframe 后在 iFrame 中调用类似 facebook 的插件,我想在 DOM 内容中执行一些脚本。
这里是类似 facebook 的 iframe 插件的代码
<iframe id="test" src="http://www.facebook.com/plugins/like.php?
href=http://yoururl.com/&
layout=button_count&
show_faces=false&
width=50&
action=like&
colorscheme=light&
height=21"
scrolling="no" frameborder="0"
style="border:none; overflow:hidden; width:50px;
height:21px;"
allowTransparency="true">
最佳答案
已回答here .
总结:可以为iframe绑定(bind)点击事件,但不能跨站。
关于jquery - 如何通过 facebook 之类的插件在 jquery 中获取鼠标单击事件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6120178/