iframe页面刷新问题

1.问题:当iframe的页面加载过再关闭之后,如果iframe的src没有发生变化,js不会重新加载,再次打开页面不会刷新;

2.解决方法:关闭页面时清空src,再次打开时即可重新加载最新数据。

$scope.updateCandidateUserValue = function (data) {

    $scope.assignment.candidateUsersName = data;

    $scope.selectUserURL = "";

    document.getElementById("selectUser").removeAttribute("src");

    $scope.isShow = false;

    $scope.$apply();

};

 

3.应用:angualrjs中出力iframe子页面时发现的问题,在后台删除数据,打开iframe页面之后关闭再打开,页面没刷新,删除数据依然存在。

4.相关,iframe自动刷新本页面:(但是会闪屏一下)

document.getElementById("selectUser").contentWindow.location.reload();

posted @ 2017-06-27 17:03  Evaxtt  阅读(2490)  评论(0编辑  收藏  举报