利用 localStorage 实现标签页之间的通信

A 页面

localStorage.setItem('test', '123');

B 页面

window.addEventListener('storage', function(e) {
    // TODO
});
posted @ 2020-03-19 13:38  月半流云  阅读(133)  评论(0编辑  收藏  举报