基本使用setTimeout(function|string, number); setTimeout 方法接收两个参数,第一个参数为回调函数或字符串,第二个参数为触发时间(单位:毫秒) setTimeout( function()...
localStorage通过监听window对象的“onstorage”事件,其他窗口获取到本窗口发送的消息,注意,必须是同一款浏览器,并且在同一个域名下。 发送消息页面: <!DOCTYPE html> <html...
精确类型检查function typeOf (obj) { const toString = Object.prototype.toString; return toString.call(obj).sl...