The first is to determine whether the browser supports this attribute, which is the attribute in HTML5:
if (window.localstorage) {
Alert (' Support ');
}else{
Alert (' not supported ');
}
Localstorage.a = 3;// set a to "3"
Localstorage["a"] = "SFSF";// set a to "SFSF", overriding the above value
Localstorage.setitem ("B", "Isaac");// set b to "Isaac"
var A1 = localstorage["A"];// gets the value of a
var a2 = localstorage.a;// gets the value of a
var B = Localstorage.getitem ("b");/ / get the value of B
Localstorage.removeitem ("C");/ / clears the value of C
And then just enter the login page to populate
if (localstorage.key_id && localstorage.username)
{
$ ("#login_merchant_id"). Val (localstorage.key_id);
$ ("#login_username"). Val (Localstorage.username);
} ;
Save when the account password is correct
localstorage.key_id = Key_uni;
Localstorage.username = Username;
Localstorage Save account password