//关闭提示条var CookieUtil={ get:function(name){ var cookieName=encodeURIComponent(name)+"=", cookieStart=document.cookie.indexOf(cookieName), cookieValue=null; if(cookieStart>-1){ var cookieEnd=document.cookie.indexOf(";",cookieStart); if(cookieEnd==-1){ cookieEnd=document.cookie.length; } cookieValue=decodeURIComponent(document.cookie.substring(cookieStart+cookieName.length,cookieEnd)); } return cookieValue; }};var clo=document.getElementById("close");var tst=document.getElementById("tishitiao");EventUtil.addHandler(clo,"click",function(){ tst.style.display="none"; document.cookie=encodeURIComponent("closetst")+"="+encodeURIComponent("closetst");});setTimeout(function(){ var cookie=CookieUtil.get("closetst"); //通过这些代码设置的cookie,ie8及火狐能正常读取,但是qq浏览器不知为什么读取不了,总是为null,这是为啥? if(cookie){ tst.style.display="none"; }},0);
添加回答
举报
0/150
提交
取消