技術(shù)導(dǎo)航網(wǎng)挺火的網(wǎng)站左下角QQ企鵝彈出代碼分享
新增這個通知功能,不過每次打開網(wǎng)頁都會彈出這個通知,要手動點知道了才可關(guān)閉,小高覺得有點煩人了。
<script src="http://libs.baidu.com/jquery/1.7.2/jquery.min.js"></script> <style> .qqanimate{display:block;position:fixed;left:150px;bottom:130px;z-index:9999999;} </style> <div class="indexpingbi" style="display:none;z-index:999999;width:100%;height:100%;position:fixed;top:0px;left:0px;background:#000;filter: alpha(opacity=70);-moz-opacity: 0.7;-khtml-opacity: 0.7;opacity: 0.7;"></div> <div class="indextanchu" style="cursor:pointer;display:none;position: fixed;left:80px;bottom: 20px;width:560px;height:250px;z-index:9999999;background:url(http://www.yibuxinxi.cn/wp-content/uploads/2021/12/ywdh-logo-1.png)no-repeat;"></div> <a target="_blank" class="qqanimate"> <img src="http://www.yibuxinxi.cn/wp-content/uploads/2021/12/ywdh-logo-1.png" width="172px" height="120px" /> </a> <script> if(getCookie("m_qq1")!='true'){ $(".indexpingbi").css("display","block"); $(".indextanchu").css("display","block"); } $(".indextanchu").live('click',function(e) { $(".indexpingbi").css("display","none"); $(".indextanchu").css("display","none"); setCookie1("m_qq1","true","d365"); }); function getCookie(name) { var dc = document.cookie; var prefix = name + "="; var begin = dc.indexOf("; " + prefix); if(begin == -1) { begin = dc.indexOf(prefix); if(begin != 0) return null } else { begin += 2 } var end = document.cookie.indexOf(";", begin); if(end == -1) { end = dc.length } return unescape(dc.substring(begin + prefix.length, end)) }; function setCookie1(name, value, time) { var strsec = getsec(time); var exp = new Date(); exp.setTime(exp.getTime() + strsec * 1); document.cookie = name + "=" + escape(value) + "; path=/;expires=" + exp.toGMTString(); } function getsec(str) { var str1 = str.substring(1, str.length) * 1; var str2 = str.substring(0, 1); if(str2 == "s") { return str1 * 1000; } else if(str2 == "h") { return str1 * 60 * 60 * 1000; } else if(str2 == "d") { return str1 * 24 * 60 * 60 * 1000; } } Array.prototype.ArrDelVal = function(val) { for(var i = 0; i < this.length; i++) { if(this[i] == val) { this.splice(i, 1); break; } } } </script>
? 版權(quán)聲明
文章版權(quán)歸作者所有,未經(jīng)允許請勿轉(zhuǎn)載。
相關(guān)文章
暫無評論...