How can I execute a script after calling [removed].href?

前端 未结 8 1456
执笔经年
执笔经年 2020-12-03 10:48

I have a script that redirects the user to another page. I want to load some content into a div on the new page after the new page has fully loaded. How can I do this. The f

8条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-03 11:02

    window.location = '#/MyPage';
    setTimeout(function() {
       //MyCode To Run After PageLoad
    });
    

提交回复
热议问题