Detect Click into Iframe using JavaScript

前端 未结 21 2319
轻奢々
轻奢々 2020-11-22 03:06

I understand that it is not possible to tell what the user is doing inside an iframe if it is cross domain. What I would like to do is track if the user clicke

21条回答
  •  栀梦
    栀梦 (楼主)
    2020-11-22 03:31

    The following code will show you if the user click/hover or move out of the iframe:-

    
    
    
    
    Detect IFrame Clicks
    
    
    
    
    



    You need to replace the src in the iframe with your own link. Hope this'll help. Regards, Mo.

提交回复
热议问题