使用 HTML5 解决方案传达打开的选项卡

发布于 2024-11-19 00:23:08 字数 210 浏览 6 评论 0原文

这就是我需要的:我在浏览器中打开了一个index.html。我打开一个新窗口,例如 caller.html。当 caller.html 加载时,它会向 index.html 发送一条消息。

我怎样才能用html5做到这一点?我正在考虑 Sharedworkers 或 Postmessage,但我没有找到可以轻松实现此功能的演示或示例代码。

我不需要跨浏览器和后备解决方案。

Here is what i need: I have an index.html opened in my browser. I open a new window, for example, caller.html. When the caller.html loads in, it sends a message to the index.html.

How can i do this with html5? I thinking about Sharedworkers or Postmessage, but i didn't find a demo or sample code that i can easily implement to this feature.

I don't need crossbrowser and fallback solution.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文