• 首页
  • Tutorials
  • API
  • DEMO
  • Google Group
  • Source Code
  • English API Docs
  • Offical Blog

Navigation

  • index
  • modules |
  • next |
  • previous |
  • KISSY v1.3 Documentation »
  • API Documentation »
  • Core »

cookie¶

view cookie source
KISSY.use('cookie',function(S,Cookie){
    // use Cookie
});

Module¶

cookie

Methods¶

cookie.get()¶
Object parse ( name )
获取cookie值
Parameters:name (String) – cookie的名称
Returns:{String} -
cookie.remove()¶
String stringify ( name, domain, path, secure )
置空cookie值,并立刻过期
Parameters:
  • name, (String) – cookie的名称
  • domain (String) – 域
  • path (String) – 路径
  • secure (Boolean) – 安全标志
cookie.set()¶
String set ( name, val[, expires, domain, path, secure] )
设置cookie值
Parameters:
  • name, (String) – cookie的名称
  • val (String) – cookie的值
  • expires (number|date) – 失效时间. number 类型时单位为天,不设置表示生效时间为本次浏览器进程。
  • domain (String) – 域
  • path (String) – 路径
  • secure (Boolean) – 安全标志

Note

推荐阅读 NCZ 的这篇文章: HTTP cookies explained

Navigation

  • index
  • modules |
  • next |
  • previous |
  • KISSY v1.3 Documentation »
  • API Documentation »
  • Core »

    Seed

    • lang
    • loader

    Core

    • ajax
    • anim
    • base
    • cookie
    • dom
    • event
    • json
    • node
    • ua

    Component

    • button
    • calendar
    • color
    • combobox
    • component
    • datalazyload
    • dd
    • editor
    • imagezoom
    • menu
    • menubutton
    • mvc
    • overlay
    • promise
    • resizable
    • rich-base
    • sizzle
    • stylesheet
    • swf
    • switchable
    • tabs
    • tree
    • uri
    • waterfall
    • xtemplate
© Copyright 2010~2012, KISSY Team. Created using Sphinx