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

前端 未结 8 1464
执笔经年
执笔经年 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条回答
  •  萌比男神i
    2020-12-03 10:51

    You are redirecting the browser with window.location.href and I'm afraid as you are purely just changing the browser's location, you can't have any affect/input on the page you are moving to (unless you use query string parameters and then create content with something like PHP (myurl.php?newcontent=whatever) )

提交回复
热议问题