一聚教程网:一个值得你收藏的教程网站

最新下载

热门教程

js 右下角浮动广告代码(四种代码)

时间:2010-09-13 编辑:简简单单 来源:一聚教程网

// 随即广告

document.write("");
var randoms=math.floor(math.random()*5+1);
if(randoms%2==0){
 
 str="
";
}else{
 str="
";
}
showmsg(str);
function showmsg(str) {
 var s="";
 var _;_;
 try{
  if(document.compatmode && document.compatmode != 'backcompat'){
   s+=('
');
  }else {
   s+=('
');
  }
  s+=(str);
  s+=('
');
  document.getelementbyid('tmpmsgdiv').innerhtml = s;
 }catch(err){}
}
function closeyxj(){
$("bottommsg").style.display='none';
//setadcookie("yxjok","ok",10);
}
function showclose(){
$("closespan").style.display='block';
//setadcookie("yxjok","ok",10);
}

浮动广告代码二

document.write("");
showmsg();
function showmsg() {
 var s="";
 var _;_;
 try{
  if(document.compatmode && document.compatmode != 'backcompat'){
   s+=('

');
  }else {
   s+=('');
  document.getelementbyid('tmpmsgdiv').innerhtml = s;
 }catch(err){}

}

浮动广告代码三

// 随即广告

document.write("");
var randoms=math.floor(math.random()*5+1);
if(randoms%2==0){
 
 str="";
}else{
 str="";
}
showmsg(str);
function showmsg(str) {
 var s="";
 var _;_;
 try{
  if(document.compatmode && document.compatmode != 'backcompat'){
   s+=('
');
  }else {
   s+=('
');
  }
  s+=(str);
  s+=('
');
  document.getelementbyid('tmpmsgdiv').innerhtml = s;
 }catch(err){}
}
function closeyxj(){
$("bottommsg").style.display='none';
//setadcookie("yxjok","ok",10);
}

浮动广告四

lastscrolly=0;
function heartbeat(){
var diffy;
if (document.documentelement && document.documentelement.scrolltop)
 diffy = document.documentelement.scrolltop;
else if (document.body)
 diffy = document.body.scrolltop
else
    {/*netscape stuff*/}
//alert(diffy);
percent=.1*(diffy-lastscrolly);
if(percent>0)percent=math.ceil(percent);
else percent=math.floor(percent);
document.getelementbyid("lovexin12").style.top=parseint(document.getelementbyid("lovexin12").style.top)+percent+"px";
document.getelementbyid("lovexin13").style.top=parseint(diffy + document.documentelement.clientheight)-199 + "px";
document.getelementbyid("lovexin14").style.top=parseint(document.getelementbyid("lovexin12").style.top)+percent+"px";
lastscrolly=lastscrolly+percent;
//alert(lastscrolly);
}//from 111com.net
suspendcode12="

"
suspendcode14="
"
suspendcode13=""
document.write(suspendcode12);
document.write(suspendcode13);
document.write(suspendcode14);
window.setinterval("heartbeat()",1);

源码下载地址

http://down.111com.net/down/code/js/duilianguanggao/2010/0911/20750.html

效果预览地址

http://g.111com.net/javascript/js/20100911/right/

热门栏目