သိုလှောင်မှု အရာဝတ္ထု _
Storage Object
Web Storage API ၏ Storage object သည် သီးခြား domain တစ်ခုအတွက် session storage သို့မဟုတ် local storage သို့ ဝင်ရောက်ခွင့် ပေးပါသည်။ ၎င်းသည် သင့်အား သိမ်းဆည်းထားသည့် ဒေတာပစ္စည်းများကို ဖတ်ရန်၊ ထည့်ရန်၊ ပြင်ဆင်ရန်နှင့် ဖျက်ရန် ခွင့်ပြုသည်။
Storage Object Properties နှင့် Methods
Property/Method |
Description |
key(n) |
Returns the name of the nth key in the storage |
length |
Returns the number of data items stored in the Storage object |
getItem(keyname) |
Returns the value of the specified key name |
setItem(keyname, value) |
Adds that key to the storage, or update that key's value if it already
exists |
removeItem(keyname) |
Removes that key from the storage |
clear() |
Empty all key out of the storage |
ဝဘ်သိုလှောင်မှု API အတွက် ဆက်စပ်စာမျက်နှာများ
Property |
Description |
window.localStorage |
Allows to save key/value pairs in a web browser. Stores the data with no
expiration date |
window.sessionStorage |
Allows to save key/value pairs in a web browser. Stores the data for one
session |