javascript - Every time the child element iframe is refreshed, the parent iframe is superimposed and loaded.
阿神
阿神 2017-05-19 10:08:26
0
1
495

Because the parent layer needs to use js to obtain the elements in the child iframe, so

$('.base')[0].onload = function(){
    $("#id").click(alert(1));
}

Now I find that every time the sub-layer is refreshed, clicking an element on the parent layer will superimpose it once
In other words, the first click will bounce once 1
Then refresh the sub-layer once, and click once again, it will bounce How to avoid 1
twice?

阿神
阿神

闭关修行中......

reply all(1)
巴扎黑
$("#id").click(alert(1));
click之前先解绑
$("#id").unbind('click').click(alert(1));
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template