右下角弹出广告代码

代码如下:

<style type="text/css">

#downmsg_emessage{POSITION: fixed;_position:absolute; z-index:100; bottom:0;right:0; background:url() no-repeat left top;width:225px;}
#donwmsg_head{float:left; display:inline; font-size:12px;color:#FFFFFF;margin-left: 26px;margin-top: 6px;}
#downmsgBar .close{float:right;width:22px;height:22px;margin-top:6px;display:block;margin-right:10px;}
#downmsgBar{height:25px;}
#donwmsg_content{height:122px;overflow:hidden;}
#donwmsg_content ul{font-size:12px;color:#007cc1; top: 34px;padding:10px 10px 0 10px;left: 6px;line-height:180;}
#donwmsg_content ul li{background:url() no-repeat -100px -245px;text-indent:13px;}
#donwmsg_content ul li a{color:#007cc1;}
#donwmsg_content ul .ll a{color:#a10000;font-weight:bold;}
#donwmsg_content p{position:absolute;left: 13px;top: 157px;}
#donwmsg_content .lb{padding:10px; font-size:16px; text-align:center;}
#donwmsg_content .lb a{color:#007cc1;font-weight:bold;}
 
.msg-hidden-btn-2{width:11px; height:11px;overflow:hidden;float:right;display:block;margin-right:5px;margin-top:6px;background:url() no-repeat left -250px;}
.msg-hidden-btn-1{ width:11px; height:11px;overflow:hidden;float:right;display:block;margin-right:5px;margin-top:6px;background:url() no-repeat -50px -250px;}
 
.sectionshover .trans{ border:solid 1px #ffc600; background-color:#fff0b6;height:24px; }
.sectionshover .trans li{float:left; width:200px;clear:none;}
</style>

<script type="text/javascript" language="javascript">
var win = window;//$w
var doc = document;//$d
var loc = location;//$l
function one(s){return doc.getElementById(s);}//$i
function two(s){return doc.getElementsByTagName(s);}//$t
function three(s){return doc.getElementsByName(s);}//$n

var www_zzjs_net = {};

www_zzjs_net.client = (function(){
 var t = {};
 var b = navigator.userAgent.toLowerCase();
 t.isOpera = (b.indexOf('opera') > -1);
 t.isIE = (!t.isOpera && b.indexOf('msie') > -1);
 t.isFF = (!t.isOpera &&!t.isIE&&b.indexOf('firefox') > -1);
 return t;
})();

www_zzjs_net.util = (function(){
 var t = {};
 t.addEvent = function(o,c,h){
  if(www_zzjs_net.client.isIE){
   o.attachEvent('on'+c,h);
  }else{
   o.addEventListener(c,h,false);
  }
  return true;
 };
 t.delEvent = function(o,c,h){
  if(www_zzjs_net.client.isIE){
   o.detachEvent('on'+c,h);
  }else{
   o.removeEventListener(c,h,false);
  }
  return true;
 };
 t.ga = function(o,s){
  return o.getAttribute(s);
 };
 t.sa = function(o,k,v){
  return o.setAttribute(k,v);
 };
 t.s2d = function(s){
  var sa = s.split('-');
  var d =  new Date(sa[0],(sa[1]-1),sa[2]);
  return d;
 };
 t.d2s = function(d,b){
  var ye = d.getFullYear();
  var me = (parseInt(d.getMonth())+1).toString()
  var de = d.getDate();
  if(me.length==1&&b)me='0'+me;
  if(de.length==1&&b)de='0'+de;
  return ye+me+de;
 };
 return t;
})();

www_zzjs_net.cookies = (function(){
 var t = {};
 t.setCookie = function(name,value,days)
 {
  if(days){
 var exp  = new Date();
 exp.setTime(exp.getTime() + days*3*1000);
 document.cookie = name + "="+ escape(value) +";expires="+ exp.toGMTString()+";path=/;";
  }else{
   document.cookie = name + "="+ escape(value)+";path=/;";
  }
 };
 
 t.getCookie = function(name)
 {
   var arr = document.cookie.match(new RegExp("(^| )"+name+"=([^;]*)(;|$)"));
   if(arr != null) return unescape(arr[2]); return null;
 };
 
 t.setCookie2 = function(name,value,days)
 {
  if(days){
 var exp  = new Date();
 exp.setTime(exp.getTime() + days*3*1000);
 document.cookie = name + "="+ encodeURIComponent(value) +";expires="+ exp.toGMTString()+";path=/;";
  }else{
   document.cookie = name + "="+ encodeURIComponent(value)+";path=/;";
  }
 };
 
 t.getCookie2 = function(name)
 {
   var arr = document.cookie.match(new RegExp("(^| )"+name+"=([^;]*)(;|$)"));
   if(arr != null) return decodeURIComponent(arr[2]); return null;
 };
 
 t.delCookie = function(name)
 {
   var exp = new Date();
   exp.setTime(exp.getTime() - 1);
   var cval=getCookie(name);
   if(cval!=null) document.cookie=name +"="+cval+";expires="+exp.toGMTString();
 };
 
 t.delCookie2 = function(name)
 {
   var exp = new Date();
   exp.setTime(exp.getTime() - 1);
   var cval=getCookie2(name);
   if(cval!=null) document.cookie=name +"="+cval+";expires="+exp.toGMTString();
 };
 
 return t;
})();

www_zzjs_net.jscload = (function(){
 var t = function(){
  if(!www_zzjs_net.quickload){
   var cs = two('label');
   for(var i=0;i<cs.length;i++){ 
    var ct = www_zzjs_net.util.ga(cs[i],'c_type');
    if(ct){
  var pe = www_zzjs_net.dom.gNxtSib(cs[i]);
  if(pe){
   eval("new "+ct+"(pe)");
  }
    }
   }
  }
  if(typeof jsconload == 'function'){
   jsconload();
  }
  www_zzjs_net.loaded = true;
 };
 return t;
})();

www_zzjs_net.jscunload = (function(){
 var t = function(){
  if(true){
   try{
 if(typeof jsconload == 'function'){
  jsconunload();
 }                          
   }catch(e){}
  }
 };
 return t;
})();

www_zzjs_net.init = (function(){
 www_zzjs_net.util.addEvent(window,'load',www_zzjs_net.jscload);
 www_zzjs_net.util.addEvent(window,'unload',www_zzjs_net.jscunload);
 return true;
})();

//
var downMsg=function(msgid,contentid,config){
 this.msg = one(msgid);
 this.content = one(contentid);
 this.config = config ? config : {start_delay:3000, speed: 5, movepx:2,cookie:'downMsgcookie',expiresDay:0};
 this.offsetHeight;
 this.emsg_objTimer;
 this.ie6Add =0;
 var _this = this;
 
 this.init = function(){
  var ifcookie=www_zzjs_net.cookies.getCookie(this.config.cookie);
  if(ifcookie == "show")
   return;
  window.setTimeout(_this.start,parseInt(_this.config.start_delay,10));
 }
 
 this.start = function(){
  _this.msg.style.display="block";
  _this.content.style.display="block";
  _this.offsetHeight = _this.content.offsetHeight;
  _this.content.style.height ="0px";
  _this.emsg_objTimer = setInterval(_this.moveUpDiv,parseInt(_this.config.speed,10));
 }
 
 this.moveUpDiv = function(){
   if(_this.offsetHeight> parseInt(_this.content.style.height,10)){
 _this.content.style.height =  parseInt(_this.content.style.height,10)+parseInt(_this.config.movepx,10)+"px";
   }
   else{
 window.clearInterval(_this.emsg_objTimer);
 www_zzjs_net.cookies.setCookie(_this.config.cookie,"show",_this.config.expiresDay);
 // ie6下才做,因为没有fixed属性
 var isMSIE = !!(/*@cc_on!@*/0);
  if(isMSIE &&!(window.XMLHttpRequest))
  {
 _this.content.style.height = parseInt(_this.content.style.height,10) +2+"px";
 _this.autoMoveIe6();
 }
   }
 }
 this.autoMoveIe6 = function(){

  if(_this.ie6Add ==0){
   _this.content.style.height =  parseInt(_this.content.style.height,10) + 1 +"px";
   _this.msg.style.bottom="-2px";
   _this.ie6Add =1;
  }
  else{
   _this.content.style.height =  parseInt(_this.content.style.height,10) - 1 +"px";
   _this.msg.style.bottom="-1px";
   _this.ie6Add =0;
  }
  setTimeout(_this.autoMoveIe6,100);
 }
}

function closeDiv()
{
 document.getElementById('downmsg_emessage').style.display='none';
}

/*function showHideDiv()
{
 var ct = document.getElementById('donwmsg_content');
 var btn = document.getElementById('msg_hidden_btn');
 if(ct.style.display!="none"){
   ct.style.display = "none";
   btn.className="msg-hidden-btn-2";
 }else{
   ct.style.display="block";
   btn.className="msg-hidden-btn-1";
 }

}*/


var start=new Date();
 start=Date.parse(start)/1000;
 var counts=30;
 function CountDown(){
  var now=new Date();
  now=Date.parse(now)/1000;
  var x=parseInt(counts-(now-start),10);
  if(x>0){
   window.setTimeout('CountDown()',300)
  }else{
   //showHideDiv();;
   ;
  }
 }
window.setTimeout('CountDown()',300);


function closeDiv()
{
 document.getElementById('downmsg_emessage').style.display='none';
}

function showHideDiv()
{
 var ct = document.getElementById('donwmsg_content');
 var btn = document.getElementById('msg_hidden_btn');
 if(ct.style.display!="none"){
   ct.style.display = "none"
   btn.className="msg-hidden-btn-2";
 }else{
   ct.style.display="block";
   btn.className="msg-hidden-btn-1";
 }

}
</script>
<script type="text/javascript">
www_zzjs_net.util.addEvent(window,"load",function(){
 var downmsg = new downMsg("downmsg_emessage","donwmsg_content",{start_delay:1000, speed: 5, movepx:2,cookie:'downMsgcookie',expiresDay:1});
 downmsg.init();
})
</script>
<script>
 function lookmsg(id,type){
  if(type=='gomsg'){
   ajaxget('affiche.php?action='+type+'&pmid='+id,'');//写cookie
   closeDiv();
   sleep(1000);
   var opentrue=window.open("pm.php?pmid="+id+"&filter=announcepm&aa="+Math.random());
   if(opentrue == false || opentrue == null){
    window.location.href="pm.php?pmid="+id+"&filter=announcepm&aa="+Math.random();
   }
  }else if(type=='closemsg'){
   ajaxget('affiche.php?action='+type+'&pmid='+id,'');//写cookie
   closeDiv();
  }
 }
 function sleep(numberMillis) {
    var now = new Date();
    var exitTime = now.getTime() + numberMillis; 
    while (true) {
     now = new Date();
     if (now.getTime() > exitTime)    return;
  }
 }
</script>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<div id="downmsg_emessage" style="display:none">
<div id="downmsgBar">
<div id="donwmsg_head" style="background-color:#66CCFF"></div>
<!--<a href="javascript:showHideDiv()"  class="msg-hidden-btn-1" id="msg_hidden_btn">查 看</a>-->
</div>
<div id="donwmsg_content" style="background-color:#ffffff; border:1px solid #CCCCCC;">

<div style="width:100; padding:5px; height:20px; background:#66CCFF"><div style="float:left; width:80px;">在线咨询</div><a href="javascript:closeDiv()" style="float:right; width:30px;">关闭</a></div>

<div id="content" style="width:100; height:85px; margin-left:auto; margin-right:auto; padding-top:5px;">
 <div style="width:200px; height:25px; font-size:14px; margin-left:10px;">
 <div><table width="100" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td>客服一</td>
    <td>&nbsp;
 <a href="http://sighttp.qq.com/cgi-bin/check?sigkey=90cb1d9b07e7dd28738046bdf569522faba65aee2b6a6b1c11998f63c09f3697"; target=_blank; onclick="var tempSrc='http://sighttp.qq.com/wpa.js?rantime='+Math.random()+'&sigkey=90cb1d9b07e7dd28738046bdf569522faba65aee2b6a6b1c11998f63c09f3697';var oldscript=document.getElementById('testJs');var newscript=document.createElement('script');newscript.setAttribute('type','text/javascript'); newscript.setAttribute('id', 'testJs');newscript.setAttribute('src',tempSrc);if(oldscript == null){document.body.appendChild(newscript);}else{oldscript.parentNode.replaceChild(newscript, oldscript);}return false;"><img border="0" SRC='http://wpa.qq.com/pa?p=1:1433528454:41' alt="在线咨询"></a> </td>
  </tr>
  <tr>
  <td>客服二</td>
    <td>&nbsp;
 <a href="http://sighttp.qq.com/cgi-bin/check?sigkey=512bd6536a3e04b0ce603496ca6b6d30ea5dfe497f9f6c43b1a0ac6fc88937d3"; target=_blank; onclick="var tempSrc='http://sighttp.qq.com/wpa.js?rantime='+Math.random()+'&sigkey=512bd6536a3e04b0ce603496ca6b6d30ea5dfe497f9f6c43b1a0ac6fc88937d3';var oldscript=document.getElementById('testJs');var newscript=document.createElement('script');newscript.setAttribute('type','text/javascript'); newscript.setAttribute('id', 'testJs');newscript.setAttribute('src',tempSrc);if(oldscript == null){document.body.appendChild(newscript);}else{oldscript.parentNode.replaceChild(newscript, oldscript);}return false;"><img border="0" SRC='http://wpa.qq.com/pa?p=1:1531499244:41' alt=""></a> </td>
  </tr>
  <tr>
  <td>客服三</td>
    <td>
 <a href="http://sighttp.qq.com/cgi-bin/check?sigkey=296d9a6a43718d82b92aa5ce426d62f315eb619745f8597db8407157195dbd55"; target=_blank; onclick="var tempSrc='http://sighttp.qq.com/wpa.js?rantime='+Math.random()+'&sigkey=296d9a6a43718d82b92aa5ce426d62f315eb619745f8597db8407157195dbd55';var oldscript=document.getElementById('testJs');var newscript=document.createElement('script');newscript.setAttribute('type','text/javascript'); newscript.setAttribute('id', 'testJs');newscript.setAttribute('src',tempSrc);if(oldscript == null){document.body.appendChild(newscript);}else{oldscript.parentNode.replaceChild(newscript, oldscript);}return false;"><img border="0" SRC='http://wpa.qq.com/pa?p=1:1293098771:41' alt=""></a>
 </td>
  </tr>
</table>
 </div>
 
 
 
 </div>   
</div>


</div>
</div>
</div>

 

使用方法:将以上代码粘贴进网页,保存为1.html即可。或者可以直接存成asp包含。

by 雪洁 2010-07-01 13:40:03 3783 views
我来说几句

相关文章