XUL (XML user language) comes with the persist attribute, which is a good attribute. The main function is to use the XUL mechanism to help you remember some values, which will be stored in the localstore. RDF file. Here I will mainly talk about a problem I encountered, which is easy to use. For example, remember that the checkbox check status can be written as follows:
<Checkbox label = "enable Javascript" Checked = "true" Persist = "checked"/>
In this case, ifProgramTurn off, and the selected status can be restored to the previous check status when you open it next time.
However, the same method does not work on textbox .. Puzzled... A coincidence later found the problem
<Textbox id = "firsttext" Persist = "value" onchange = "This. setattribute ('value', this. Value)"/>
With the red text, persist can work normally .. Ah, you have to force the definition to change to set the value.
In addition, the persist must have an ID to take effect. Persist is followed by some attributes, including value width and so on, separated by spaces.