문제

Is it possible to bind a click event to an iframe whose source is some other domain/third party? If yes, how different is it from the conventional way?

도움이 되었습니까?

해결책

This is not possible due to the Same Origin Policy.

다른 팁

Yes, as Rory mentioned in his answer,

You cannot do this because of web browser's same origin policy.

But there is a iframeTracker jQuery plugin, that claims to track clicks on iframes : https://github.com/finalclap/iframeTracker-jquery

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top