Closed sailei1 closed 3 years ago
// 接收页面 window.addEventListener('storage', function (e) { if (e.key == 'xxx') { console.log(e.newValue); // 用完移除 localStorage.removeItem('xxx'); } });
//触发页面 localStorage.setItem('xxx',JSON.stringify({...}))