localstorage set item
localStorage.getItem('data')
localStorage.setItem('token', 'token here');
localStorage.removeItem('token');
localstorage set item
localStorage.getItem('data')
localStorage.setItem('token', 'token here');
localStorage.removeItem('token');
save text of div to localStorage, update localStorage when text is changed
// get the text
var text = $('#test').text();
// set the item in localStorage
localStorage.setItem('test', text);
// bind text to 'blur' event for div
$('#test').on('blur', function() {
// check the new text
var newText = $(this).text();
// overwrite the old text
localStorage.setItem('test', newText);
// test if it works
alert(localStorage.getItem('test'));
});
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us