Home >Web Front-end >JS Tutorial >How to transfer data between javascript browser windows_javascript skills
The example in this article describes the method of transferring data between JavaScript browser windows. Share it with everyone for your reference. The specific analysis is as follows:
Summary:
We often encounter pop-up windows during project development. Some use div to simulate the pop-up window effect, some use iframe, and some open a new window through the open function that comes with the window. What I will share with you today is the last way to open the page for data interaction through the window.open() function. First, take a look at the renderings:
Principle:
The parent window passes data to the child window through the url parameters, and the child window passes data to the parent window through the global function of the parent window.
Code:
index.html is as follows:
window.html is as follows:
Note: A service environment is required to run here
I hope this article will be helpful to everyone’s JavaScript programming design.