Home > Web Front-end > JS Tutorial > Use jquery to operate session method sharing_jquery

Use jquery to operate session method sharing_jquery

WBOY
Release: 2016-05-16 16:18:32
Original
1949 people have browsed it

Summary:

What I’m sharing today is using jquery to handle sessions. We will use the sessionStorage object, which is similar to the localStorage object, except that sessionStorage is used to store session data. This data will be cleared when the user closes the browser.

Introduction:
JquerySession is a library based on jquery for handling sessions. Using it can simplify our work. You need to introduce jquery before using it.

Grammar:

Add data
$.session.set('key', 'value')

Delete data
$.session.remove('key');

Get data
$.session.get('key');

Clear data
$.session.clear();

Download JquerySession

You will find that jQuerysession is really easy to use after using it. I hope you like it

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template