jQuery.localStorage() - jQuery SDK API

2463 단어 localStorage
jQuery.localStorage() - jQuery SDK API
jQuery.localStorage()
From jQuery SDK API
 
Jump to:
navigation ,
search
Categories:
Data
Contents:
  • jQuery.localStorage( key )
  • jQuery.localStorage( key )

  • jQuery.localStorage( key, value )
  • jQuery.localStorage( key, value )


  • 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.
    Examples
    Get a value from the local storage.Javascript:
    $.localStorage( 'foo', {data:'bar'} );
    
    $.localStorage( 'foo' );
    Results:
    {data:'bar'}

    jQuery.localStorage( key, value )
    Description: Set a value to the local storage.
    Plugin: jQuery.storage
    jQuery.localStorage( key, value )version added: 1.0 key   A key for value to store.value   A value to store.
    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.
    Examples
    Set a value to the local storage.Javascript:
    $.localStorage( 'foo', {data:'bar'} );

    좋은 웹페이지 즐겨찾기