JS 操作组件

获取Cookie值:

function getCookie(Name)   
{
    var search = Name + "=";
    if(document.cookie.length > 0){
        offset = document.cookie.indexOf(search);
          if(offset != -1){
              offset += search.length;
              end = document.cookie.indexOf(";", offset);
              if(end == -1)
                  end = document.cookie.length;
              return unescape(document.cookie.substring(offset, end));
         }else return ""
    }
}
posted @ 2012-07-26 13:46  tokeep  阅读(203)  评论(0编辑  收藏  举报