2024年9月对联广告代码(网页对联广告代码 css 可关闭)

 更新时间:2024-09-21 09:11:53

  ⑴对联广告代码(网页对联广告代码css可关闭

  ⑵网页对联广告代码css可关闭

  ⑶把theFloaters.addItem....这两个修改一下,在里面添加《divstyle=“text-align:right;“》《spanonclick=“document.getElementById(’followDiv’).style.display=’none’“》X《/span》《/div》重要的是onclick=“document.getElementById(’followDiv’).style.display=’none’“这个不能少,你想要哪个点击关闭就把这个放到哪个HTML标签里面,其它的可以根据自己需要修改美化一下改成theFloaters.addItem(’followDiv’,’document.body.clientWidth-’,,’《divstyle=“text-align:right;“》《spanonclick=“document.getElementById(’followDiv’).style.display=’none’“》X《/span》《/div》《ahref=);//左面theFloaters.addItem(’followDiv’,,,’《divstyle=“text-align:right;“》《spanonclick=“document.getElementById(’followDiv’).style.display=’none’“》X《/span》《/div》《ahref=);

  ⑷js对联广告代码我只要左边的不要右边的求源代码

  ⑸//常见的对联浮动广告效果的代码使用方法,本文介绍的这种效果,在*分辨率下正常显示,在*的分辨率下可以自动隐藏,以免遮住页面影响访问者浏览内容,下面就是实现效果所需代码://-------------------------------------------------------------------vardelta=.varcollection;functionfloaters(){this.items=;this.addItem=function(id,x,y,content){document.write(’《DIVid=’+id+’style=“Z-INDEX:;POSITION:absolute;width:px;height:px;left:’+(typeof(x)==’string’?eval(x):x)+’;top:’+(typeof(y)==’string’?eval(y):y)+’“》’+content+’《/DIV》’);varnewItem={};newItem.object=document.getElementById(id);newItem.x=x;newItem.y=y;this.items[this.items.length]=newItem;}this.play=function(){collection=this.itemssetInterval(’play()’,);}}functionplay(){if(screen.width《=){for(vari=;i《collection.length;i++){collection.object.style.display=’none’;}return;}for(vari=;i《collection.length;i++){varfollowObj=collection.object;varfollowObj_x=(typeof(collection.x)==’string’?eval(collection.x):collection.x);varfollowObj_y=(typeof(collection.y)==’string’?eval(collection.y):collection.y);if(followObj.offsetLeft!=(document.body.scrollLeft+followObj_x)){vardx=(document.body.scrollLeft+followObj_x-followObj.offsetLeft)*delta;dx=(dx》?:-)*Math.ceil(Math.abs(dx));followObj.style.left=followObj.offsetLeft+dx;}if(followObj.offsetTop!=(document.body.scrollTop+followObj_y)){vardy=(document.body.scrollTop+followObj_y-followObj.offsetTop)*delta;dy=(dy》?:-)*Math.ceil(Math.abs(dy));followObj.style.top=followObj.offsetTop+dy;}followObj.style.display=’’;}}vartheFloaters=newfloaters();theFloaters.addItem(’followDiv’,’document.body.clientWidth-’,,’《/a》《br》《ahref=广告链接地址target=_blank》《imgsrc=);theFloaters.addItem(’followDiv’,,,’《br》《ahref=广告链接地址target=_blank》《imgsrc=);theFloaters.play();//-------------------------------------------------------------------//把上面的代码另存为一个JS文件,然后在想实现此效果的页面用《scripttype=“text/javascript“language=“javascript.“src=调用即可,*代表你另存的文件名!注意修改广告图片地址和连接地址!

  ⑹高手请解释一下此对联广告代码(保证快速结贴

  ⑺这是网页内放的代码:《!--对联广告条--》《SCRIPTFOR=’EoolAd’EVENT=’fsmand()’LANGUAGE=’JavaScript’》AdLayer.style.visibility=’hidden’;AdLayer.style.visibility=’hidden’;《/script》《scriptsrc=中关闭按扭为close_btnflash文件EoolAdb.swf可以把下面JS中代码改为你的FLASH名flash中关闭代码:close_btn.onRelease=function(){fsmand(“quit“);//作为HTML中EoolAD对象的响应事件}这是JS代码functioninitEcAd(){document.all.AdLayer.style.posTop=-;document.all.AdLayer.style.visibility=’visible’document.all.AdLayer.style.posTop=-;document.all.AdLayer.style.visibility=’visible’MoveLeftLayer(’AdLayer’);MoveRightLayer(’AdLayer’);}functionMoveLeftLayer(layerName){varx=;vary=;vardiff=(document.body.scrollTop+y-document.all.AdLayer.style.posTop)*.;vary=document.body.scrollTop+y-diff;eval(“document.all.“+layerName+“.style.posTop=y“);eval(“document.all.“+layerName+“.style.posLeft=x“);setTimeout(“MoveLeftLayer(’AdLayer’);“,);}functionMoveRightLayer(layerName){varx=;vary=;vardiff=(document.body.scrollTop+y-document.all.AdLayer.style.posTop)*.;vary=document.body.scrollTop+y-diff;eval(“document.all.“+layerName+“.style.posTop=y“);eval(“document.all.“+layerName+“.style.posRight=x“);setTimeout(“MoveRightLayer(’AdLayer’);“,);}document.write(“《divid=AdLayerstyle=’position:absolute;visibility:hidden;z-index:’》《EMBEDsrc=);initEcAd()

  ⑻静态网页浮动对联代码

  ⑼通用使用方法:将下面的代码复制到对应的广告位置,更改广告内容即可(具体细节请看代码里的说明系统使用方法:将下面代码复制到首页的某个自定义标记里(建议复制到默认的index_bottom_part标记里,更改广告内容,更新首页即可飘浮对联广告源码/代码:《script》//这是关闭飘浮广告的宽度,请根据你的广告内容而定varhbcms_ad_width=;//这是关闭飘浮广告的代码,可以换成图片,点击即可关闭varhbcms_close_str=’《divonClick=“closeBanner();“style=“color:gray;font-size:pt;cursor:hand;text-align:center;width:%;background-color:white;“》关闭《/div》’;//设置左边的广告代码,请自己更换图片地址,或换成flash,或换成纯文字//如果不希望显示左边的广告,可设置为=’’;varhbcms_left_ad=’《imgsrc=设置右边的广告代码,如果要和左边的广告一致,可设为=hbcms_left_ad;//如果不希望显示右边的广告,可设置为=’’;varhbcms_right_ad=hbcms_left_ad;vardelta=.;varcollection;varcloseB=false;functionfloaters(){this.items=;this.addItem=function(id,x,y,content){document.write(’《DIVid=’+id+’style=“Z-INDEX:;POSITION:absolute;width:’+hbcms_ad_width+’px;height:px;left:’+(typeof(x)==’string’?eval(x):x)+’;top:’+(typeof(y)==’string’?eval(y):y)+’“》’+content+’《/DIV》’);varnewItem={};newItem.object=document.getElementById(id);newItem.x=x;newItem.y=y;this.items[this.items.length]=newItem;}this.play=function(){collection=this.itemssetInterval(’play()’,);}}functionplay(){if(screen.width《=||closeB){for(vari=;i《collection.length;i++){collection[i].object.style.display=’none’;}return;}for(vari=;i《collection.length;i++){varfollowObj=collection[i].object;varfollowObj_x=(typeof(collection[i].x)==’string’?eval(collection[i].x):collection[i].x);varfollowObj_y=(typeof(collection[i].y)==’string’?eval(collection[i].y):collection[i].y);if(followObj.offsetLeft!=(document.body.scrollLeft+followObj_x)){vardx=(document.body.scrollLeft+followObj_x-followObj.offsetLeft)*delta;dx=(dx》?:-)*Math.ceil(Math.abs(dx));followObj.style.left=followObj.offsetLeft+dx;}if(followObj.offsetTop!=(document.body.scrollTop+followObj_y)){vardy=(document.body.scrollTop+followObj_y-followObj.offsetTop)*delta;dy=(dy》?:-)*Math.ceil(Math.abs(dy));followObj.style.top=followObj.offsetTop+dy;}followObj.style.display=’’;}}functioncloseBanner(){closeB=true;return;}vartheFloaters=newfloaters();theFloaters.addItem(’followDiv’,’document.body.clientWidth-’,hbcms_ad_width,hbcms_right_ad);theFloaters.addItem(’followDiv’,,hbcms_ad_width,hbcms_left_ad);theFloaters.play();《/script》

  ⑽不懂代码,怎样制作网页对联广告

  ⑾把下面代码插到你的页面中,图片地址自己修改一下。《SCRIPTLANGUAGE=“JavaScript“》《!--varshowad=true;varToppx=;//上端位置varAdDivW=;//宽度varAdDivH=;//高度varPageWidth=;//这个参数决定是否出现左右滚动条varMinScreenW=; //显示广告的最小屏幕宽度象素varClosebuttonHtml=’《divalign=“right“style=“position:absolute;top:px;right:px;margin:px;padding:px;z-index:;“》《ahref=()“style=“color:red;text-decoration:none;font-size:px;“》关闭《/a》《/div》’varAdContentHtml=’《divalign=“center“》《imgsrc=图片地址“》《/div》’;varAdContentHtml=’《divalign=“center“》《imgsrc=图片地址“》《/div》’;document.write(’《divid=“Javascript.LeftDiv“style=“position:absolute;border:pxsolid#;background-color:#EEEEE;z-index:;width:’+AdDivW+’px;height:’+AdDivH+’px;top:-px;word-break:break-all;“》’+ClosebuttonHtml+’《div》’+AdContentHtml+’《/div》《/div》’);document.write(’《divid=“Javascript.RightDiv“style=“position:absolute;border:pxsolid#;background-color:#EEEEE;z-index:;width:’+AdDivW+’px;height:’+AdDivH+’px;top:-px;word-break:break-all;“》’+ClosebuttonHtml+’《div》’+AdContentHtml+’《/div》《/div》’);functionscall(){ if(!showad){return;} if(window.screen.width《MinScreenW){ alert(“临时提示:

  ⑿显示器分辨率宽度小于“+MinScreenW+“,不显示广告“); showad=false; document.getElementById(“Javascript.LeftDiv“).style.display=“none“; document.getElementById(“Javascript.RightDiv“).style.display=“none“; return; } varBorderpx=((window.screen.width-PageWidth)/-AdDivW)/-; document.getElementById(“Javascript.LeftDiv“).style.display=““; document.getElementById(“Javascript.LeftDiv“).style.top=document.body.scrollTop+Toppx; document.getElementById(“Javascript.LeftDiv“).style.left=document.body.scrollLeft+Borderpx; document.getElementById(“Javascript.RightDiv“).style.display=““; document.getElementById(“Javascript.RightDiv“).style.top=document.body.scrollTop+Toppx; document.getElementById(“Javascript.RightDiv“).style.left=document.body.scrollLeft+document.body.clientWidth-document.getElementById(“Javascript.RightDiv“).offsetWidth-Borderpx;}functionhidead(){ showad=false; document.getElementById(“Javascript.LeftDiv“).style.display=“none“; document.getElementById(“Javascript.RightDiv“).style.display=“none“;}window.onscroll=scall;window.onresize=scall;window.onload=scall;//--》《/SCRIPT》

  ⒀复制下面代码放到js文件里就行了导入用《scriptlanguage=“javascript“src=你的js文件名.js“》《/script》放到你的首页就可以了你应该满意这段代码的效果吧兼容firefoxf/ie/chrome以下是js文件代码直接复制即可:lastScrollY=;functionheartBeat(){vardiffY;if(document.documentElement&&document.documentElement.scrollTop)diffY=document.documentElement.scrollTop;elseif(document.body)diffY=document.body.scrollTopelse{/*scapestuff*/}//alert(diffY);percent=.*(diffY-lastScrollY);if(percent》)percent=Math.ceil(percent);elsepercent=Math.floor(percent);document.getElementById(“LeftAd“).style.top=parseInt(document.getElementById(“LeftAd“).style.top)+percent+“px“;document.getElementById(“RightAd“).style.top=parseInt(document.getElementById(“LeftAd“).style.top)+percent+“px“;lastScrollY=lastScrollY+percent;//alert(lastScrollY);}suspendcode=“《DIVid=LeftAdstyle=’left:px;POSITION:absolute;TOP:px;’》《imgsrc=()’onclick=’javascript:ClosedivLeft()’hidefocus=’true’》关闭《/a》《/div》“suspendcode=“《DIVid=RightAdstyle=’right:px;POSITION:absolute;TOP:px;’》《imgsrc=()’onclick=’javascript:ClosedivRight()’hidefocus=’true’》关闭《/a》《/div》“document.write(suspendcode);document.write(suspendcode);window.setInterval(“heartBeat()“,);functionClosedivLeft(){LeftAd.style.visibility=“hidden“;}functionClosedivRight(){RightAd.style.visibility=“hidden“;}

  ⒁JS对联广告代码初级

  ⒂《!DOCTYPEhtml》《htmllang=“en“》《head》《metacharset=“UTF-“》《title》对联广告《/title》《style》#leftFloat{width:px;height:px;background-color:red;position:fixed;left:px;/*IE兼容*/_position:absolute;_top:expression(document.documentElement.scrollTop+(document.documentElement.clientHeight-this.offsetHeigh)/);}

您可能感兴趣的文章:

相关文章