aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/mozilla/tech/xul/attribute/persist/index.html
blob: b1d30d5a5903969929373596a81f179c6be37f03 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
---
title: persist
slug: Mozilla/Tech/XUL/Attribute/persist
tags:
  - XUL Attributes
translation_of: Archive/Mozilla/XUL/Attribute/persist
---
<div class="noinclude">
 <span class="breadcrumbs xulRefAttr_breadcrumbs">« <a href="/zh-CN/docs/XUL_Reference">XUL Reference home</a></span></div>
<dl>
 <dt>
  <code id="a-persist"><a href="https://developer.mozilla.org/zh-CN/docs/Mozilla/Tech/XUL/Attribute/persist">persist</a></code></dt>
 <dd>
  Type:
  <i>
   space-separated list of attribute names</i>
 </dd>
 <dd>
  A space-separated list of attributes that are maintained when the window is closed. When the window is re-opened, the values of persistent attributes are restored. In Mozilla, persistent attributes are stored in the per-profile file <code>localstore.rdf</code>. Persistence can also be stored using the <code>document.persist</code> function. In order for persistence to work, the element must also have an <code id="a-id"><a href="https://developer.mozilla.org/zh-CN/docs/Mozilla/Tech/XUL/Attribute/id">id</a></code>.</dd>
</dl>
<p> </p>
<div class="noinclude">
  </div>
<p></p>