var  cookieUtil = {
            setCookie :function (cname, cvalue, exdays) {
                var exdate = new Date();
                exdate.setDate(exdate.getDate()+exdays);
                var expires =exdays?"expires="+exdate.toUTCString():"";
                document.cookie = cname + "=" + cvalue + "; " + expires + "; path=/;domain=.uborm.com.cn;";
            },

            getCookie:function (cname) {
                var name = cname + "=";
                var ca = document.cookie.split(';');
                for(var i=0; i<ca.length; i++) {
                    var c = ca[i];
                    while (c.charAt(0)==' ') c = c.substring(1);
                    if (c.indexOf(name) != -1) return c.substring(name.length, c.length);
                }
                return "";
            },
   
            clearCookie:function (name) {
                setCookie(name, "", -1);
            }
        }

 

相关文章:

  • 2021-12-26
  • 2022-12-23
  • 2021-12-26
  • 2021-12-26
  • 2021-08-29
  • 2021-10-14
  • 2021-05-17
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-09-24
  • 2021-07-17
  • 2021-12-24
  • 2022-12-23
  • 2020-03-29
相关资源
相似解决方案