Removing items from the localStorage

后端 未结 4 1245
长发绾君心
长发绾君心 2021-01-13 14:54

I\'m trying to remove the individual items from the localStorage. I\'m using localStorage for storing selected list items in the listview. I attached the checkboxes for remo

4条回答
  •  庸人自扰
    2021-01-13 15:26

    try removing items like this, removing local storage items by their key values

    //syntax is localStorage.removeItem('keyName');
    //so if your key name is checked                  
    localStorage.removeItem('checked');
    

    See this Link for reading about local storage.

提交回复
热议问题