Skip to content
 
 

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

cookie

cookie is HTTP cookie. This library can better help you use cookie, for example, you can use the getter and setter methods

####Methods getCookies():get all cookie set(name, value[, opts]):set cookie; name is key,value is value of key; opts is a obj that contains max-age、path、domain、secure attributes get(name):get a cookie value by name remove(name): delete a cookie by name clear(): clear all cookie noConflict(name):handling conflict and creating new name for this library ####Quick start You can see the cookie.html flie, it contains some examples
(1) Add script in your html

<script type="text/javascript" src="cookie.js" ></script>

(2) Use methods: cookie is a global var.

cookie.set('name', 'vczero');
cookie.getCookies();
cookie.get('name');
cookie.remove('name');
cookie.clear();
cookie.noConflict(true /*a new name of cookie*/);

About

A Util library of Cookie(操作cookie的工具类)

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages