📅  最后修改于: 2022-03-11 15:03:36.798000             🧑  作者: Mango
// 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'));