Можно. Курить документацию по
localStorage и по
Storage const dg = document.getElementById.bind(document);
const inKey = dg('in-key');
const inVal = dg('in-val');
dg('btn-to').addEventListener('click', e => {
localStorage.setItem(inKey.value, inVal.value);
});
dg('btn-from').addEventListener('click', e => {
inVal.value = localStorage.getItem(inKey);
});
dg('btn-list').addEventListener('click', e => {
let list = [];
for (let i = 0; i < localStorage.length; i++) {
let k = localStorage.key(i);
list.push('<dt>'+k+'</dt><dd>'+localStorage.getItem(k)+'</dd>');
dg('list').innerHTML = list.join('\n');
}
});
рабочий пример