JavaScript:检测iframe中的链接点击 [英] JavaScript: Detection of a link click inside an iframe
本文介绍了JavaScript:检测iframe中的链接点击的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何使用JavaScript检测用户点击iframe中的链接?
How to detect user's click on the link inside the iframe using JavaScript?
推荐答案
您可以检查iframe加载事件
You are able to check iframe load event
onLoad="alert(this.contentWindow.location);"
或在jquery上:
$('iframe#yourId').load(function() {
alert("the iframe has been loaded");
});
这篇关于JavaScript:检测iframe中的链接点击的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文