📜  jquery 中的本地存储 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:36.798000             🧑  作者: Mango

代码示例1
// get the text
var text = $('#test').text();

// set the item in localStorage
localStorage.setItem('test', text);

// alert the value to check if we got it
alert(localStorage.getItem('test'));