Movatterモバイル変換


[0]ホーム

URL:


  1. 面向开发者的 Web 技术
  2. Web API
  3. Window
  4. storage

此页面由社区从英文翻译而来。了解更多并加入 MDN Web Docs 社区。

View in EnglishAlways switch to English

storage

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since 2017年4月.

当存储区域(localStorage 或 sessionStorage)被修改时,将触发 storage 事件。查看Web Storage API 来获取更多信息。

常规信息

说明:Web Storage

接口StorageEvent
是否冒泡No
目标DefaultView (<window>)
默认行为

属性

PropertyTypeDescription
target只读EventTarget事件目标 (DOM 树中的最大目标)
type只读DOMString事件的类型
bubbles只读Boolean事件通常是否会出现冒泡
cancelable只读Boolean事件是否可取消
key只读DOMString (string)键更改时
oldValue只读DOMString (string)正在更改键的旧值
newValue只读DOMString (string)正在更改键的新值
url只读DOMString (string)键更改的文档的地址
storageArea只读Storage受影响的存储对象

规范

Specification
HTML
# event-storage
HTML
# handler-window-onstorage

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2026 Movatter.jp