parent.location.reload in iframe not working IE

后端 未结 3 482
生来不讨喜
生来不讨喜 2021-01-24 21:42

I need refresh in parent site / refresh my browser when I click testing. I have source index.php:



        
相关标签:
3条回答
  • 2021-01-24 22:12

    This works in IE, Chrome and Firefox and may be others

    window.top.location.reload();
    
    0 讨论(0)
  • 2021-01-24 22:13

    Try adding "window" after parent.

    parent.window.location.reload(true);
    
    0 讨论(0)
  • 2021-01-24 22:24

    use this function

    function reloadParentPage() {
        var selfUrl = unescape(parent.window.location.pathname);
        parent.location.reload(true);
    
        parent.window.location.replace(selfUrl);
    
        parent.window.location.href = selfUrl;
    }
    
    0 讨论(0)
提交回复
热议问题