2012-02-05 6 views
0

ブログの一番下には、1日に1回しか表示したくない通知バーがあります。私はどのようにそれのためのクッキーを書くだろうか?スクリプトのコードは次のとおりです。Javascript通知バー - 1日に1回のみ表示されますか?

<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> 

ありがとうございました!

+0

ビューアごとに1日に1回ですか? –

+0

ええと...複数のページにアクセスすると、すべてのページにロードされません。 – Benjer

答えて

0

は、明日@ 12amに期限を設定するだけではありませんか?

関連する問題