留言板

iframe click event not working.

Pankaj Kumar,修改在7 年前。

iframe click event not working.

Regular Member 帖子: 101 加入日期: 14-7-27 最近的帖子
Hi,

I have to perform some action on click of iframe.Once i execute the script i get following exception.
getting this exception Dom Exception: Blocked a frame with origin "https://............. " from accessing a cross-origin frame.


Below is the code for script.

var iframe = A.one('iframe.common-structure-video');

iframe.getDOMNode().contentWindow.document.onclick = function(e){
alert(e);
});

Pl. let me know how can i get this working.

Thanks & Regards,
Pankaj Semwal