1、获取子页面iframe的点击事件
1.1、获取iframe
var frame = document.getElementById('addrClick2');
1.2、获取点击事件
var IframeOnClick = {
resolution: 200,
iframes: [],
interval: null,
Iframe: function () {
this.element = arguments[0];
this.cb = arguments[1];
this.hasTracked = false;
}, track: function (element, cb) {
this.iframes.push(new this.Iframe(element, cb));
if (!this.interval) {
var _this = this;
this.interval = setInterval(function () {
_this.checkClick();
}, this.resolution);
}
}, checkClick: function () {
if (