我试图将输入文本添加到本地存储
document.getElementById('nick').value;localStorage.setItem('nick', value);

答案 0 :(得分:0)
尝试此操作:
var val = document.getElementById('nick').value;
localStorage.setItem('nick', val);
答案 1 :(得分:0)
将<{1}}用于此
localStorage.setItem