I achieve the function of localStorage