js使用BroadcastChannel api实现跨窗口消息发送接收示例代码

代码语言:html

所属分类:其他

代码描述:js使用BroadcastChannel api实现跨窗口消息发送接收示例代码

代码标签: js 使用 BroadcastChannel api 跨窗口 消息 发送 接收 示例 代码

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html lang="en">
<head>
   
<meta charset="UTF-8">
   
<meta name="viewport" content="width=device-width, initial-scale=1.0">
   
<title>BroadcastChannel Example</title>
</head>
<body>
   
<input type="text" id="input" placeholder="Enter message">
    <button id="sendBut.........完整代码请登录后点击上方下载按钮下载查看

网友评论0