Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/419.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript通知栏-每天只显示一次?_Javascript_Cookies - Fatal编程技术网

Javascript通知栏-每天只显示一次?

Javascript通知栏-每天只显示一次?,javascript,cookies,Javascript,Cookies,我的博客底部有一个通知栏,我希望每天只出现一次。我该怎么写饼干呢?以下是脚本的代码: <style type='text/css'> #ut-sticky { background:url(&#39;http://3.bp.blogspot.com/-7oGSlq30cTw/Tv33CS4WGgI/AAAAAAAAA0w/HxId_tRUae8/s1600/ut-bg.png&#39;) repeat; color:#fff; text-align: center;

我的博客底部有一个通知栏,我希望每天只出现一次。我该怎么写饼干呢?以下是脚本的代码:

<style type='text/css'>
#ut-sticky
{
background:url(&#39;http://3.bp.blogspot.com/-7oGSlq30cTw/Tv33CS4WGgI/AAAAAAAAA0w/HxId_tRUae8/s1600/ut-bg.png&#39;) repeat; 
color:#fff;
text-align: center;
margin:0 auto; 
border-top: 1px solid #fff;
height:64px; 
font-size:13px; 
position:fixed; 
bottom:0; 
z-index:999; 
width:95%;
border-top-left-radius:15px;
border-top-right-radius:15px; 
display:block;
font-weight: bold;
font-family: arial,&quot;Helvetica&quot;;
font-color:#fff;
}
#ut-sticky:hover
{background:#333;}
#ut-sticky p{line-height:5px; font-size:18px; text-align:center; width:95%; float:left;}
#ut-sticky p a{font-size:18px; font-weight:bold; font-family:&quot;Arial&quot;; color:#cfe7d1;}
.ut-cross{display:block; position:relative; right:15px; float:right;}
.ut-cross a{font-size:18px; font-weight:bold; font-family:&quot;Arial&quot;; color:#cfe7d1; line-height:30px;}
</style>
<div id='ut-sticky'>
<p><a href='http://bit.ly/yq10RE' target='_blank'>Use Google Reader? Why not add www.BenjerMcVeigh.com to your Google Reader list?</a>&#160;&#160;&#160;&#160;&#160;<a href='http://bit.ly/yq10RE' target='_blank'><img alt='Add to Google' border='0' src='http://gmodules.com/ig/images/plus_google.gif'/></a></p>
<div class='ut-cross'><a href='javascript:hide_cross();'>X</a></div>
</div>
<script language='JavaScript'>
function hide_cross() {
crosstbox = document.getElementById(&quot;ut-sticky&quot;);
crosstbox.style.visibility = &#39;hidden&#39;;
}
</script>

#不粘
{
背景:url(';http://3.bp.blogspot.com/-7oGSlq30cTw/Tv33CS4WGgI/AAAAAAAAA0w/HxId_tRUae8/s1600/ut-bg.png'重复;
颜色:#fff;
文本对齐:居中;
保证金:0自动;
边框顶部:1px实心#fff;
高度:64px;
字体大小:13px;
位置:固定;
底部:0;
z指数:999;
宽度:95%;
边框左上半径:15px;
边框右上角半径:15px;
显示:块;
字体大小:粗体;
字体系列:arial,“Helvetica”;
字体颜色:#fff;
}
#ut粘性:悬停
{背景:#333;}
#ut sticky p{行高:5px;字体大小:18px;文本对齐:中心;宽度:95%;浮点:左;}
#ut sticky PA{字体大小:18px;字体重量:粗体;字体系列:“Arial”;颜色:#cfe7d1;}
.ut交叉{显示:块;位置:相对;右:15px;浮点:右;}
.ut交叉a{font size:18px;font-weight:bold;font-family:“Arial”;color:#cfe7d1;行高:30px;}
     

函数hide_cross(){ crosstbox=document.getElementById(“ut粘性”); crosstbox.style.visibility=';隐藏';; }

谢谢

不只是将到期日设置为明天上午12点就可以了吗?

是的……因此,如果他们碰巧访问了多个页面,则不会在每个页面上加载它。