实现原理 使用BroadcastChannelAPI可以在同源的条件下创建自定义命名的频道,频道名相同可以相互通信。使用message事件监听,使用postMessage发送信息 项目代码 代码树 core.js index.html play.html core.js const musicList=[ {name:'嘉宾',url:'https://cdn-static

- 阅读全文 -