How can I access the document property of another html page?
-
One html page has a button, through document I can refer to it, and there is the same button on another page. How can I access the second button while on the first page?JavaScript Anonymous, Jun 10, 2019
-
By pages do you mean tabs from the same browser?
If both pages are on the same site, then this is possible through messages, localStorage, workers, etc.
Otherwise, you have to make friends .
As a last resort - write and then use your browser extension, giving it the rights to access the data of any tabs.Stella Cooke -
If you open a tab through window.open
From child to parent
https://developer.mozilla.org/en-US/docs / Web / API / W ...
To reach the child from the parent
https://developer.mozilla.org/en-US/docs / Web / API / W ...
Anonymous
2 Answers
Your Answer
To place the code, please use CodePen or similar tool. Thanks you!