jQuery.localStorage() - jQuery SDK API

From jQuery SDK API

 
search
Categories: Data

Contents:

jQuery.localStorage( key )Returns: Object

Description: Get a value from the local storage.

Plugin: jQuery.storage

  • jQuery.localStorage( key )

    version added: 1.0

    key   A key of a stored value.

The jQuery.localStorage() method uses the native localStorage, if the localStorage object not available, the storage will be handled with cookies as fall back method.

    Get a value from the local storage.

    Javascript:
$.localStorage( 'foo', {data:'bar'} );

$.localStorage( 'foo' );
Results:
{data:'bar'}

相关文章:

  • 2022-01-07
  • 2022-01-24
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-11-20
  • 2021-04-18
  • 2022-03-01
  • 2021-09-21
  • 2022-01-22
  • 2021-05-31
相关资源
相似解决方案