Access a variable of iframe from parent

后端 未结 6 918
野趣味
野趣味 2020-12-03 09:35

script of iframe


script of parent window



        
6条回答
  •  攒了一身酷
    2020-12-03 10:10

    This is how SharePoint do it when passing argument values from the parent window to the iframe. It's simple, but it works.

    
    
      
      
    
    
    

    Inside iframeContent.html:

    
    
        
    
    
    

    The other way around (accessing ifr.dialogArgs from the parent window after having its value modified by the iframe document) also works.

提交回复
热议问题