飘浮、对联及悬浮广告代码大全

合集下载

Javascript实现带关闭按钮的网页漂浮广告代码

Javascript实现带关闭按钮的网页漂浮广告代码

Javascript实现带关闭按钮的⽹页漂浮⼴告代码复制代码代码如下:<html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><title>带关闭按钮的⽹页漂浮⼴告代码</title></head><body><div id="img" style="position: absolute; left: 311; top: 815;visibility :hidden;" onmouseover="clearInterval(interval)" onmouseout="interval = setInterval('changePos()', delay)" align="right"><a href="#" target="_blank"><img border="0" src="图⽚路径" onload="return imgzoom(this,600);"onclick="javascript:window.open(this.src);" style="cursor:pointer;"/></a><span style="CURSOR:hand;color:red;font-weight:bold" onclick="clearInterval(interval);img.style.visibility ='hidden'">X</span></div><script language=javascript src=ff.js></script></body></html>ff.js代码复制代码代码如下:var xPos = 20;var yPos = document.body.clientHeight;var step = 1;var delay = 30;var height = 0;var Hoffset = 0;var Woffset = 0;var yon = 0;var xon = 0;var pause = true;var interval;img.style.top = yPos;function changePos() {width = document.body.clientWidth;height = document.body.clientHeight;Hoffset = img.offsetHeight;Woffset = img.offsetWidth;img.style.left = xPos + document.body.scrollLeft;img.style.top = yPos + document.body.scrollTop;if (yon) {yPos = yPos + step;}else {yPos = yPos - step;}if (yPos < 0) {yon = 1;yPos = 0;}if (yPos >= (height - Hoffset)) {yon = 0;yPos = (height - Hoffset);}if (xon) {xPos = xPos + step;}else {xPos = xPos - step;}if (xPos < 0) {xon = 1;xPos = 0;}if (xPos >= (width - Woffset)) {xon = 0;xPos = (width - Woffset);}}function start() {img.style.visibility = "visible";interval = setInterval('changePos()', delay); }start();。

对联广告源代码

对联广告源代码

[普通效果]现在很多网站广告做的如火如荼,现在我就来介绍一下常见的对联浮动广告效果的代码使用方法,介绍的这种效果,在1024*768分辨率下正常显示,在800*600的分辨率下可以自动隐藏,以免遮住页面影响访问者浏览内容,下面就是实现效果所需代码:var delta=0.015var collection;function floaters() {this.items = [];this.addItem = function(id,x,y,content){document.write('<DIV id='+id+' style="Z-INDEX: 0; POSITION: absolute; width:80px;height:60px;left:'+(typeof(x)=='string'?eval(x):x)+';top:'+(typeof(y)=='string'? eval(y):y)+'">'+content+'</DIV>');var newItem = {};newItem.object = document.getElementById(id);newItem.x = x;newItem.y = y;this.items[this.items.length] = newItem;}this.play = function(){collection = this.itemssetInterval('play()',10);}}function play(){if(screen.width<=800){for(var i=0;i<collection.length;i++){collection[i].object.style.display = 'none';}return;}for(var i=0;i<collection.length;i++){var followObj = collection[i].object;var followObj_x = (typeof(collection[i].x)=='string'?eval(collection[i].x):collection[i].x);var followObj_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>0?1:-1)*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>0?1:-1)*Math.ceil(Math.abs(dy));followObj.style.top=followObj.offsetTop+dy;}followObj.style.display = '';}}var theFloaters = new floaters();theFloaters.addItem('followDiv1','document.body.clientWidth-100',0,'</a><br><a href=广告链接地址target=_blank><img src=广告图片地址width=100 height=400 border=0></a>');theFloaters.addItem('followDiv2',0,0,'<br><a href=广告链接地址target=_blank><img src=广告图片地址 width=100 height=400 border=0></a>');theFloaters.play();把上面的代码另存为一个JS文件,然后在想实现此效果的页面用调用即可!注意修改广告图片地址和连接地址![鼠标感应]与前面一个代码不同的是,当鼠标移动到广告图片上是可以感应显示另外设置好的广告大图效果,下面就是实现效果所需代码:function bigshow(){document.all.div_250.style.visibility = 'visible';document.all.div_80.style.visibility = 'hidden';}function bighide(){document.all.div_80.style.visibility = 'visible';document.all.div_250.style.visibility = 'hidden';}var ad_80= new Array(1);var ad_250= new Array(1);ad_80[0]="<a href= target=_blank><img src=/skin/adv43/ad/ad_ad.gif border=0></a>";ad_250[0]="<a href= target=_blank><img src=/skin/adv43/ad/ad_ad2.gif border=0></a>";var imgheight;var fubioleft;window.screen.width>800 ? fubioleft=15:fubioleft=15document.write('<DIV id=floater_left style="Z-INDEX: 25; LEFT:'+fubioleft+'px; WIDTH: 28px;POSITION: absolute; TOP: 42px; HEIGHT: 22px">');ad_now = new Date();ad_id= ad_now.getSeconds() %1var adhead1="<div id=div_80 style='position:absolute; width:95px; height:62px; z-index:12' onMouseOver=bigshow();>";var adhead2="</div><div id=div_250 style='position:absolute; visibility: hidden; z-index:13;width: 80; height: 60' onMouseOut=bighide();>";//var adhead1="<div id=div_80 style='position:absolute; width:95px; height:62px; z-index:20' onMouseOut='//MM_showHideLayers(\"div_250\",\"\",\"hide\")' onMouseOver='MM_showHideLayers(\"div_250\",\"\",\"show\")'>";//var adhead2="</div><div id=div_250 style='position:absolute; z-index:21;visibility: hidden; width: 80; height: 60' onMouseOver='MM_showHideLayers(\"div_250\",\"\",\"show\")'onMouseOut='MM_showHideLayers(\"div_250\",\"\",\"hide\")'>";document.write(adhead1+ad_80[ad_id]+adhead2+ad_250[ad_id]+"</div>");document.write ("</div>");self.onError=null;currentX = currentY = 0;whichIt = null;lastScrollX = 0; lastScrollY = 0;NS = (yers) ? 1 : 0;IE = (document.all) ? 1: 0;function heartBeat() {if(IE) {diffY = document.body.scrollTop;diffX = document.body.scrollLeft; }if(NS) {diffY = self.pageYOffset; diffX = self.pageXOffset; }if(diffY != lastScrollY) {percent = .5 * (diffY - lastScrollY);if(percent > 0) percent = Math.ceil(percent);else percent = Math.floor(percent);if(IE) document.all.floater_left.style.pixelTop += percent;if(NS) document.floater_left.top += percent;lastScrollY = lastScrollY + percent;}if(diffX != lastScrollX) {percent = .5 * (diffX - lastScrollX);if(percent > 0) percent = Math.ceil(percent);else percent = Math.floor(percent);if(IE) document.all.floater_left.style.pixelLeft += percent;if(NS) document.floater_left.left += percent;lastScrollX = lastScrollX + percent;}}if(NS || IE) action = window.setInterval("heartBeat()",1);var ad_80= new Array(1); var ad_250= new Array(1);ad_80[0]="<a href= target=_blank><img src=/skin/adv43/ad/ad_ad.jpg border=0></a>";ad_250[0]="<a href= target=_blank><img src=/skin/adv43/ad/ad_ad.jpg border=0></a>";var imgheight;var fubioleft;window.screen.width>800 ? fubioleft=15:fubioleft=15document.write('<DIV id=floater_right style="Z-INDEX: 25; LEFT:'+fubioleft+'px; WIDTH: 28px;POSITION: absolute; TOP: 42px; HEIGHT: 22px">');ad_now = new Date();ad_id= ad_now.getSeconds() %1function myload(){if (navigator.appName == "Netscape"){document.div_right_80.pageX=+window.innerWidth-130;document.div_right_250.pageX=+window.innerWidth-300;mymove();}else{div_right_80.style.left=document.body.offsetWidth-130;div_right_250.style.left=document.body.offsetWidth-300;mymove();}}function mymove(){if(document.ns){document.div_right_80.left=pageXOffset+window.innerWidth-130;document.div_right_250.left=pageXOffset+window.innerWidth-300;setTimeout("mymove();",20)}else{div_right_80.style.left=document.body.scrollLeft+document.body.offsetWidth-145; div_right_250.style.left=document.body.scrollLeft+document.body.offsetWidth-300; setTimeout("mymove();",20)}}var adhead1="<div id=div_right_80 style='position:absolute; width:95px; height:60px; z-index:12' onMouseOver=bigshow_right();>";var adhead2="</div><div id=div_right_250 style='position:absolute; visibility: hidden; z-index:13;width: 250; height: 250' onMouseOut=bighide_right();><div align=right>";document.write(adhead1+ad_80[ad_id]+adhead2+ad_250[ad_id]+"</div></div>");myload()document.write ("</div>");self.onError=null;currentX_right = currentY_right = 0;whichIt_right = null;lastScrollX_right = 0; lastScrollY_right = 0;NS = (yers) ? 1 : 0;IE = (document.all) ? 1: 0;function heartBeat_right() {if(IE) {diffY_right = document.body.scrollTop;diffX_right = document.body.scrollLeft; }if(NS) {diffY_right = self.pageYOffset; diffX_right = self.pageXOffset; }if(diffY_right != lastScrollY_right) {percent_right = .5 * (diffY_right - lastScrollY_right);if(percent_right > 0) percent_right = Math.ceil(percent_right); else percent_right = Math.floor(percent_right);if(IE) document.all.floater_right.style.pixelTop += percent_right;if(NS) document.floater_right.top += percent_right;lastScrollY_right = lastScrollY_right + percent_right;}if(diffX_right != lastScrollX_right) {percent_right = .5 * (diffX_right - lastScrollX_right);if(percent_right > 0) percent_right = Math.ceil(percent_right);else percent_right = Math.floor(percent_right);if(IE) document.all.floater_right.style.pixelLeft += percent_right;if(NS) document.floater_right.left += percent_right;lastScrollX_right = lastScrollX_right + percent_right;}}if(NS || IE) action = window.setInterval("heartBeat_right()",1);function bigshow_right(){document.all.div_right_250.style.visibility = 'visible';document.all.div_right_80.style.visibility = 'hidden';}function bighide_right(){document.all.div_right_80.style.visibility = 'visible';document.all.div_right_250.style.visibility = 'hidden';}document.write('');document.write('');document.write('');把上面的代码另存为一个JS文件,然后在想实现此效果的页面用调用即可,*代表你另存的文件名!注意修改广告图片地址和连接地址![允许关闭]与前面两个代码不同的是,广告图下方增加了一个图片按纽,允许访客点击关闭广告图片,下面文本框中就是实现效果所需代码:var delta=0.015;var collection;var closeB=false;function floaters() {this.items = [];this.addItem = function(id,x,y,content){document.write('<DIV id='+id+' style="Z-INDEX: 10; POSITION: absolute; width:80px; height:60px;left:'+(typeof(x)=='string'?eval(x):x)+';top:'+(typeof(y)=='string'? eval(y):y)+'">'+content+'</DIV>');var newItem = {};newItem.object = document.getElementById(id);newItem.x = x;newItem.y = y;this.items[this.items.length] = newItem;}this.play = function(){collection = this.itemssetInterval('play()',30);}}function play(){if(screen.width<=800 || closeB){for(var i=0;i<collection.length;i++){collection[i].object.style.display = 'none';}return;}for(var i=0;i<collection.length;i++){var followObj = collection[i].object;var followObj_x = (typeof(collection[i].x)=='string'?eval(collection[i].x):collection[i].x);var followObj_y = (typeof(collection[i].y)=='string'?eval(collection[i].y):collection[i].y);if(followObj.offsetLeft!=(document.body.scrollLeft+followObj_x)) {var dx=(document.body.scrollLeft+followObj_x-followObj.offsetLeft)*delta;dx=(dx>0?1:-1)*Math.ceil(Math.abs(dx));followObj.style.left=followObj.offsetLeft+dx;}if(followObj.offsetTop!=(document.body.scrollTop+followObj_y)) {var dy=(document.body.scrollTop+followObj_y-followObj.offsetTop)*delta;dy=(dy>0?1:-1)*Math.ceil(Math.abs(dy));followObj.style.top=followObj.offsetTop+dy;}followObj.style.display = '';}}function closeBanner(){closeB=true;return;}var theFloaters = new floaters();//theFloaters.addItem('followDiv1','document.body.clientWidth-100',0,'<aonClick="closeBanner();" href= target=_blank><img src=ad/doublead/right.gif width=100 height=554 border=0></a><br><br><img src=ad/doublead/close.gif onClick="closeBanner();">');theFloaters.addItem('followDiv2',0,0,'<a onClick="closeBanner();" href= target=_blank><img src=ad/doublead/ad_ad.gif width=100 height=400 border=0 ></a><br><br><img src=ad/doublead/close.gif onClick="closeBanner();">');theFloaters.play();把上面的代码另存为一个JS文件,然后在想实现此效果的页面用调用即可,*代表你另存的文件名!注意修改广告图片地址和连接地址![左侧代码]如果您想只有一侧显示的话,下面是实现左侧效果所需代码:var ad_float_left_src ="图片地址";var ad_float_left_url ="地址";var ad_float_left_type = "";document.ns = navigator.appName == "Microsoft Internet Explorer"var imgheight_closevar imgleftwindow.screen.width>800 ? imgheight_close=120:imgheight_close=120 window.screen.width>800 ? imgleft=8:imgleft=122function myload(){myleft.style.top=document.body.scrollTop+document.body.offsetHeigh t-imgheight_close;myleft.style.left=imgleft;leftmove();}function leftmove(){myleft.style.top=document.body.scrollTop+document.body.offsetHeigh t-imgheight_close;myleft.style.left=imgleft;setTimeout("leftmove();",50)}function MM_reloadPage(init) { //reloads the window if Nav4 resizedif (init==true) with (navigator) {if ((appName=="Netscape")&& (parseInt(appVersion)==4)) {document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();}MM_reloadPage(true)function close_float_left(){myleft.style.visibility='hidden';}document.write("<div id=myleft style='position:absolute;width:80;top:300;left:5;visibility: visible;z-index: 1'>" +"<style>"+"A.closefloat:link,A.refloat:visited {text-decoration:none;color:#000000;font-size:12px}"+"A.closefloat:active,A.refloat:hover{text-decoration:underline;color:#0000FF;font-size:12px}"+"</style>"+"<table border=0 cellpadding=0 cellspacing=0><tr><td>");if(document.ns){if(ad_float_left_type!="swf")document.write("<a href='" + ad_float_left_url + "' target= '_blank'><img src='" + ad_float_left_src + "' WIDTH=88height=31 border=0></a>");elsedocument.write("<EMBED src='" + ad_float_left_src + "'quality=high WIDTH=80 HEIGHT=80 TYPE='application/x-shockwave-flash' id=changhongout ></EMBED>");document.write("</td></tr><tr><td width=80 height=20align=right><a href='javascript:close_float_left();void(0);'class=closefloat><b><font color=#ff0000>关闭</font></b></a></td></tr>"+"</table>"+"</div>");myload()}调用即可,*代表你另存的文件名!注意修改广告图片地址和连接地址!相应的参数可以根据页面自行调整。

JS漂浮广告代码

JS漂浮广告代码
if (window.innerHeight && window.scrollMaxY) {
xScroll = document.body.scrollWidth;
yScroll = window.innerHeight + window.scrollMaxY;
obj.onmouseover=function(){clearInterval(interval);}
obj.onmouseout=function(){interval=setInterval(obj.CustomMethod, delay);}
}
}
***** content ******
</div>
var ad=new AdMove("Div2");
ad.Run();
*/
////////////////////////////////////////////////////////
var AdMoveConfig=new Object();
xScroll = document.documentElement.scrollLeft;
} else if (document.body) {
xScroll = document.body.scrollLeft;
}
if (self.pageYOffset) {
yScroll = self.pageYOffset;
}
var obj=document.getElementById(id);
obj.style.position="absolute";
var W=AdMoveConfig.MoveWidth-obj.offsetWidth;

各类漂浮广告代码、弹窗广告代码大全

各类漂浮广告代码、弹窗广告代码大全
-->
</SCRIPT>
参数解释:
<SCRIPT LANGUAGE="java script"> js脚本开始;
window.open 弹出新窗口的命令;
'page.html' 弹出窗口的文件名;
'newwindow' 弹出窗口的名字(不是文件名),非必须,可用空''代替;
window.open(′url′,′窗口名′,′属性列表′);
〈/script〉
其中“url”是在窗口中显示的html文档的地址;“窗口名”可任意起一个,但不要用中文;“属性列表”是一个用逗号分开的各个属性值的字符串,它确定了弹出窗口的外观与状态。常用属性有:
toolbar(是否显示工具栏
将下面这段代码插入你的页面中,在页面加载时就会自动弹出一个窗口,并打开Google搜索引擎,是不是很简单啊!
将代码放置在〈!?XXX --〉中间是为了兼容较低版本浏览器的需要,在低版本的浏览器中标签内的内容将被视作注视。
打开的页面使用绝对路径(http://)或相对路径(../page.htm)都可以。
-->
</script>
然后,在相同目录下新建一个popup.htm网页(注意要与上面的url对应!),用于显示在弹出窗口中。在新建文件的源代码中加入如下代码:
代码:
<script language="java script">
function closeit() {
setTimeout("self.close()",10000)

常用网页漂浮广告代码

常用网页漂浮广告代码

常用网页漂浮广告代码代码:1.<body bgcolor="#F7F7F7"><!--图片漂浮广告代码开始--><div id="www_qpsh_com" style="position:absolute"> <!--链接地址--><a href="链接地址" target="_blank"> <!--图片地址--><img src="图片地址" border="0"></a></div><script>var x = 50,y = 60var xin = true, yin = truevar step = 1var delay = 10var obj=document.getElementById("www_qpsh_com") function floatwww_qpsh_com() {var L=T=0var R= document.body.clientWidth-obj.offsetWidth var B = document.body.clientHeight-obj.offsetHeight obj.style.left = x + document.body.scrollLeftobj.style.top = y + document.body.scrollTopx = x + step*(xin?1:-1)if (x < L) { xin = true; x = L}if (x > R){ xin = false; x = R}y = y + step*(yin?1:-1)if (y < T) { yin = true; y = T }if (y > B) { yin = false; y = B }}var itl= setInterval("floatwww_qpsh_com()", delay)obj.onmouseover=function(){clearInterval(itl)}obj.onmouseout=function(){itl=setInterval("floatwww_qpsh _com()", delay)}</script><!--图片漂浮广告代码结束--></body>2.<body bgcolor="#F7F7F7"><!--图片漂浮广告代码开始--><div id="www_qpsh_com" style="position:absolute"><!--链接地址--><a href="链接地址" target="_blank"><!--图片地址--><img src="图片地址" border="0"></a></div><script>var x = 50,y = 60var xin = true, yin = truevar step = 1var delay = 10var obj=document.getElementById("www_qpsh_com")function floatwww_qpsh_com() {var L=T=0var R= document.body.clientWidth-obj.offsetWidthvar B = document.body.clientHeight-obj.offsetHeightobj.style.left = x + document.body.scrollLeftobj.style.top = y + document.body.scrollTopx = x + step*(xin?1:-1)if (x < L) { xin = true; x = L}if (x > R){ xin = false; x = R}y = y + step*(yin?1:-1)if (y < T) { yin = true; y = T }if (y > B) { yin = false; y = B }}var itl= setInterval("floatwww_qpsh_com()", delay)obj.onmouseover=function(){clearInterval(itl)}obj.onmouseout=function(){itl=setInterval("floatwww_qpsh _com()", delay)}</script><!--图片漂浮广告代码结束--></body>。

js浮动广告 对联广告代码

js浮动广告 对联广告代码

<script>// 这是关闭飘浮广告的宽度,请根据你的广告内容而定var hbcms_ad_width = 126;// 这是关闭飘浮广告的代码,可以换成图片,点击即可关闭var hbcms_close_str = '<div onClick="closeBanner();" style="color:gray;font-size:9pt;cursor:hand;text-align:center;width:100%;background-color: white;">关闭</div>';// 设置左边的广告代码,请自己更换图片地址,或换成flash,或换成纯文字// 如果不希望显示左边的广告,可设置为= '';var hbcms_left_ad = '<img src="images/duilian.jpg" width=100% height=384>' + hbcms_close_str;// 设置右边的广告代码,如果要和左边的广告一致,可设为= hbcms_left_ad;// 如果不希望显示右边的广告,可设置为= '';var hbcms_right_ad = hbcms_left_ad;var delta=0.8;var collection;var closeB=false;function floaters() {this.items = [];this.addItem = function(id,x,y,content){document.write('<DIV id='+id+' style="Z-INDEX: 10; POSITION: absolute; width:'+hbcms_ad_width+'px;height:60px;left:'+(typeof(x)=='string'?eval(x):x)+';top:'+(typeof(y)=='string'?eval(y):y)+'">'+cont ent+'</DIV>');var newItem = {};newItem.object = document.getElementById(id);newItem.x = x;newItem.y = y;this.items[this.items.length] = newItem;}this.play = function(){collection = this.itemssetInterval('play()',30);}}function play(){if(screen.width<=800 || closeB){for(var i=0;i<collection.length;i++){collection[i].object.style.display = 'none';}return;}for(var i=0;i<collection.length;i++){var followObj = collection[i].object;var followObj_x = (typeof(collection[i].x)=='string'?eval(collection[i].x):collection[i].x);var followObj_y = (typeof(collection[i].y)=='string'?eval(collection[i].y):collection[i].y);if(followObj.offsetLeft!=(document.body.scrollLeft+followObj_x)) {var dx=(document.body.scrollLeft+followObj_x-followObj.offsetLeft)*delta;dx=(dx>0?1:-1)*Math.ceil(Math.abs(dx));followObj.style.left=followObj.offsetLeft+dx;}if(followObj.offsetTop!=(document.body.scrollTop+followObj_y)) {var dy=(document.body.scrollTop+followObj_y-followObj.offsetTop)*delta;dy=(dy>0?1:-1)*Math.ceil(Math.abs(dy));followObj.style.top=followObj.offsetTop+dy;}followObj.style.display = '';}}function closeBanner(){closeB=true;return;}var theFloaters = new floaters();theFloaters.addItem('followDiv1','document.body.clientWidth-106',hbcms_ad_width,hbcms_right _ad);theFloaters.addItem('followDiv2',6,hbcms_ad_width,hbcms_left_ad);theFloaters.play();</script>。

悬浮广告代码-js手机端网站底部和头部悬浮html广告代码教程【附实例】

悬浮广告代码-js手机端网站底部和头部悬浮html广告代码教程【附实例】

悬浮⼴告代码-js⼿机端⽹站底部和头部悬浮html⼴告代码教程【附实例】<script>document.write("<style>");document.write("#topNavad{background-color:#fff0; z-index:999; position:fixed; top:0; left:0; width:100%; _position:absolute;");document.write("_top: expression(documentElement.scrollTop + documentElement.clientHeight-this.offsetHeight); overflow:visible; }");document.write("#bottomNavad{background-color:#fff0; z-index:999; position:fixed; bottom:0; left:0; width:100%; _position:absolute;");document.write("_top: expression(documentElement.scrollTop + documentElement.clientHeight-this.offsetHeight); overflow:visible; }");document.write("<\/style>");document.write("");document.write(" ");document.write("<!--头部-->");document.write("<div id=\"topNavad\">");document.write("<div id=\"MyDiv2\">");document.write("<div id=\"newsImg\">");document.write("<center>");document.write("<a href=\"https:\/\/\" rel=\"nofollow\" target=\"_blank\">");document.write("<img src=\"shunwang.jpg\" title=\"AD\" \/ style=\"width:100%\">");document.write("<\/a>");document.write("<\/center>");document.write("<\/div>");document.write("<span onclick='CloseDiv(\"MyDiv2\")' style=\"text-align:right; display:block;\">关闭<\/span>");document.write("");document.write("<\/div>");document.write("<\/div>");document.write("<!--头部end-->");document.write("");document.write("<!--底部-->");document.write("<div id=\"bottomNavad\">");document.write("<div id=\"MyDiv1\">");document.write("<span onclick='CloseDiv(\"MyDiv1\")' style=\"text-align:right; display:block;\">关闭<\/span>");document.write("<center>");document.write("<a href=\"https:\/\/\" rel=\"nofollow\" target=\"_blank\">");document.write("<img src=\"shunwang.jpg\" title=\"AD\" \/ style=\"width:100%\">");document.write("<\/a>");document.write("<\/center>");document.write("<\/div>");document.write("<\/div>");document.write("<!--底部end-->");document.write("");function CloseDiv(div) {document.getElementById(div).style.display = 'none';};</script>悬浮⼴告代码-js⼿机端⽹站底部和头部悬浮html⼴告代码教程-移动端的悬浮⼴告代码html版本:<style>#topNavad{background-color:#fff0; z-index:999; position:fixed; top:0; left:0; width:100%; _position:absolute;_top: expression(documentElement.scrollTop + documentElement.clientHeight-this.offsetHeight); overflow:visible; }#bottomNavad{background-color:#fff0; z-index:999; position:fixed; bottom:0; left:0; width:100%; _position:absolute;_top: expression(documentElement.scrollTop + documentElement.clientHeight-this.offsetHeight); overflow:visible; }</style><!--头部--><div id="topNavad"><div id="MyDiv2"><div id="newsImg"><center><a href="https://" rel="nofollow" target="_blank"><img src="shunwang.jpg" title="AD" / style="width:100%"></a></center></div><span onclick='CloseDiv("MyDiv2")' style="text-align:right; display:block;">关闭</span></div></div><!--头部end--><!--底部--><div id="bottomNavad"><div id="MyDiv1"><span onclick='CloseDiv("MyDiv1")' style="text-align:right; display:block;">关闭</span> <center><a href="https://" rel="nofollow" target="_blank"><img src="shunwang.jpg" title="AD" / style="width:100%"></a></center></div></div><!--底部end--><script>function CloseDiv(div) {document.getElementById(div).style.display = 'none';};</script>。

常用网页广告代码全集-js广告代码大全

常用网页广告代码全集-js广告代码大全

一条滚动下载伸缩广告下载轮换下载焦点图广告下载77:FLASH+XML迅雷影片广告特效下载78:韩国购物网FLASH滚动广告下载79:Flash+XML滚动新闻代码下载80:西安腾讯网flash焦点广告下载81:四屏flash图片轮换代码下载82:图片渐变轮换焦点图效果下载83:CSS写的图片滚动下拉广告下载84:MSN超酷flash图片轮换下载85:沪江英语网3图弹性广告下载86:SOHU体育flash图片轮换下载87:MSN频道4屏新闻广告效果下载88:用层实现的滚动条效果下载89:迅雷网七屏flash 广告轮换下载90:奥林匹克运动会焦点广告下载91:一种选项卡样式广告代码下载92:网站页首可关闭广告条下载93:flash无限图片展示广告下载94:电子杂志首页flash焦点图下载95:Zcom电子杂志flash焦点图下载96:flash滑动焦点图广告代码下载97:9格FLASH图片广告代码下载98:MSN健康频道CSS标准焦点图下载99:JS带缩略图的5屏轮换广告下载100:JS4屏焦点图轮换代码下载101:索尼中国Flash+Xml广告下载102:弹性菜单样式的图片展示下载103:带摘要的Flash图片代码下载104:JS图片卷帘门效果下载105:3d图片墙flash+xml 下载106:360度旋转展示flash+xml 下载107:带翻页的JS图片切换效果下载108:JS三图横向平滑切换下载109:四屏切换JS广告代码下载110:JavaScript图片切换效果下载111:在线客服代码下载112:单独关闭的两边悬挂代码下载113:全屏可伸缩可关闭广告代码下载114:四屏JS带缩略图的焦点图下载115:书角带阴影的撕页广告效果下载116:JS+flash可上下翻页焦点图下载117:广告自动轮播代码演示下载118 :3屏Flash竖焦点图广告演示下载119: 不规则焦点图广告代码演示下载120:3屏循环式立体焦点图代码下载20状态栏文字拉长的分类:JS代码更新时间:09-05-16点击次数:0次推荐等级:★★★★我要发布素材∙1能让按钮发出声音的分类:JS代码更新时间:09-05-16点击次数:0次推荐等级:★★★★我要发布素材∙19导航菜单下拉展开分类:JS代码更新时间:09-05-16点击次数:0次推荐等级:★★★★我要发布素材∙18说明框的各种用法分类:JS代码更新时间:09-05-16点击次数:0次推荐等级:★★★★我要发布素材∙17页面窗口的由小变分类:JS代码更新时间:09-05-16点击次数:0次推荐等级:★★★★我要发布素材∙16网页的任意缩放分类:JS代码更新时间:09-05-16点击次数:0次推荐等级:★★★★我要发布素材∙15直接调用计算机中分类:JS代码更新时间:09-05-16点击次数:0次推荐等级:★★★★我要发布素材∙14用JS的方法使用列分类:JS代码更新时间:09-05-16点击次数:0次推荐等级:★★★★我要发布素材∙13用JavaScript实现分类:JS代码更新时间:09-05-16点击次数:0次推荐等级:★★★★我要发布素材∙12用Javascript实现分类:JS代码更新时间:09-05-16点击次数:0次推荐等级:★★★★我要发布素材∙11地震效果的浏览器分类:JS代码更新时间:09-05-16点击次数:0次推荐等级:★★★★我要发布素材∙10星星跟随鼠标分类:JS代码更新时间:09-05-16点击次数:0次推荐等级:★★★★我要发布素材。

网页两边悬浮窗广告代码

网页两边悬浮窗广告代码

<html xmlns="/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><title>悬浮广告</title></head><body><div style="height:900px; display:block;"></div><div id="AdLayer1" style='position: absolute; ;z-index:1; left:100px; border:1px #DDD solid; width:36px; height:200px; background-color:#CCC;'></div><div id="AdLayer2" style='position: absolute; ;z-index:1; right:100px; border:1px #DDD solid; width:36px; height:200px; background-color:green;'></div><script type="text/javascript">// 页面初始化function initEcAd() {document.all.AdLayer1.style.posTop = 200;document.all.AdLayer1.style.visibility = 'visible'document.all.AdLayer2.style.posTop = 200;document.all.AdLayer2.style.visibility = 'visible'MoveLeftLayer('AdLayer1');MoveRightLayer('AdLayer2');}// 移动左面的广告层function MoveLeftLayer(layerName) {var x = 100;var y = 100;// 左侧广告距离页首高度var diff = (document.body.scrollTop + y - document.all.AdLayer1.style.posTop)*.40;var y = document.body.scrollTop + y - diff;eval("document.all." + layerName + ".style.posTop = parseInt(y)");eval("document.all." + layerName + ".style.posLeft = x");setTimeout("MoveLeftLayer('AdLayer1');", 20);}// 移动右边的广告层function MoveRightLayer(layerName) {var x = 100;var y = 100;// 右侧广告距离页首高度var diff = (document.body.scrollTop + y - document.all.AdLayer2.style.posTop)*.40;var y = document.body.scrollTop + y - diff;eval("document.all." + layerName + ".style.posTop = y");eval("document.all." + layerName + ".style.posRight = x");setTimeout("MoveRightLayer('AdLayer2');", 20);}initEcAd()</script> </body> </html>。

网页两边悬浮窗广告代码

网页两边悬浮窗广告代码

<html xmlns="/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><title>悬浮广告</title></head><body><div style="height:900px; display:block;"></div><div id="AdLayer1" style='position: absolute; ;z-index:1; left:100px; border:1px #DDD solid; width:36px; height:200px; background-color:#CCC;'></div><div id="AdLayer2" style='position: absolute; ;z-index:1; right:100px; border:1px #DDD solid; width:36px; height:200px; background-color:green;'></div><script type="text/javascript">// 页面初始化function initEcAd() {document.all.AdLayer1.style.posTop = 200;document.all.AdLayer1.style.visibility = 'visible'document.all.AdLayer2.style.posTop = 200;document.all.AdLayer2.style.visibility = 'visible'MoveLeftLayer('AdLayer1');MoveRightLayer('AdLayer2');}// 移动左面的广告层function MoveLeftLayer(layerName) {var x = 100;var y = 100;// 左侧广告距离页首高度var diff = (document.body.scrollTop + y - document.all.AdLayer1.style.posTop)*.40;var y = document.body.scrollTop + y - diff;eval("document.all." + layerName + ".style.posTop = parseInt(y)");eval("document.all." + layerName + ".style.posLeft = x");setTimeout("MoveLeftLayer('AdLayer1');", 20);}// 移动右边的广告层function MoveRightLayer(layerName) {var x = 100;var y = 100;// 右侧广告距离页首高度var diff = (document.body.scrollTop + y - document.all.AdLayer2.style.posTop)*.40;var y = document.body.scrollTop + y - diff;eval("document.all." + layerName + ".style.posTop = y");eval("document.all." + layerName + ".style.posRight = x");setTimeout("MoveRightLayer('AdLayer2');", 20);}initEcAd()</script> </body> </html>。

JS实现悬浮移动窗口(悬浮广告)的特效

JS实现悬浮移动窗口(悬浮广告)的特效

JS实现悬浮移动窗⼝(悬浮⼴告)的特效js⽅法:复制代码代码如下:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "/TR/html4/loose.dtd"><html><head><title> New Document </title><meta name="Generator" content="EditPlus"><meta name="Author" content=""><meta name="Keywords" content=""><meta name="Description" content=""><script type="text/javascript">window.onload=function(){//写⼊var oneInner = document.createElement("div");oneInner.setAttribute("style","background:#663398;position:absolute;width:100px;height:100px;border:solid 3px #2F74A7;cursor:pointer;");var oneButton = document.createElement("input");oneButton.setAttribute("type","button");oneButton.setAttribute("value","x");if (oneButton.style.cssFloat){oneButton.style.cssFloat="right"}else{oneButton.style.styleFloat="right"}oneInner.appendChild(oneButton);document.body.appendChild(oneInner);//定时器var a1a = setInterval(moves,100);//函数var x = 10;var y = 10;function moves(){var tops = oneInner.offsetTopvar lefts = oneInner.offsetLeftif (lefts>=document.documentElement.clientWidth-oneInner.offsetWidth||lefts<=0){x=-x}if (tops>=document.documentElement.clientHeight-oneInner.offsetHeight||tops<=0){y=-y}tops+=y;lefts+=x;oneInner.style.top=tops+"px"oneInner.style.left=lefts+"px"}//悬停停⽌oneInner.onmouseover=function(){clearInterval(a1a);}//放⼿继续运动oneInner.onmouseout=function(){a1a =setInterval(moves,100);}//删除oneButton.onclick=function(){document.body.removeChild(oneInner);}}</script></head><body></body></html>jquery⽅法:复制代码代码如下:<!DOCTYPE html><html><head><title></title><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><script type="text/javascript" src="https:///workspace/js/jquery-1.7.min.js"></script><script>$(function(){//写⼊div$("<div/>",{id:"moveWindow"}).css({width:"200px",height:"200px",border:"solid 3px#2F74A7",background:"#663398",position:"absolute",cursor:"pointer"}).appendTo("body");//写⼊关闭按钮$("<div/>",{id:"removeMW"}).css({width:"20px",height:"20px",background:"red",float:"right"}).appendTo("#moveWindow"); //定时器var move = setInterval(moves,100);var x= 10;var y= 10;function moves (){var mw = $("#moveWindow").offset();var lefts =mw.left;var tops = mw.top;if (lefts>=$(window).width()-$("#moveWindow").width()||lefts<=0){x=-x}if (tops>=$(window).height()-$("#moveWindow").height()||tops<=0){y=-y}lefts+=x;tops+=y;$("#moveWindow").offset({top:tops,left:lefts});}//悬停停⽌运动$("#moveWindow").mouseover(function(){clearInterval(move);});//移开⿏标后继续运动$("#moveWindow").mouseout(function(){move = setInterval(moves,100);});//点击按钮关闭$("#removeMW").click(function(){$("#moveWindow").remove();});})</script></head><body></body></html>基本思路:1.页⾯加载完成之后向页⾯插⼊窗⼝,之后向窗⼝插⼊关闭按钮2.使⽤setInterval()函数触发moves()函数开始动画3.moves函数:⾸先获取当前窗⼝位置,之后随时间使窗⼝位移,每当位移到游览器边缘时反向运动4.添加其他事件:⿏标悬停停⽌运动,⿏标离开继续运动,点击按钮关闭窗⼝ps:不建议使⽤这个特效,影响⽤户体验希望对你有所帮助!^_^!~~。

超简单无缝滚动漂浮广告代码属性

超简单无缝滚动漂浮广告代码属性

超简单⽆缝滚动漂浮⼴告代码属性实现功能:1、⽆缝滚动(左右上下)2、漂浮⼴告(包括在屏幕漂浮⼏次消失)两个事件onmouseover="this.stop()" ⿏标划过停⽌滚动onmouseout="this.start()" ⿏标离开继续滚动<marquee width="920" onmouseover="this.stop()" onmouseout="this.start()" scrollamount="20" behavior="scroll" align="absbottom"> @foreach (var item in Model.NewsItems_WebNotice){<u><a href="@Url.RouteUrl("NewsItem", new { SeName = item.SeName })">@Html.StrTruncation(item.Title, 10)</a></u>}</marquee>Marquee 属性列表:align设定<marquee>标签内容的对齐⽅式absbottom:绝对底部对齐(与g、p等字母的最下端对齐)absmiddle:绝对中央对齐baseline:底线对齐bottom:底部对齐(默认)left:左对齐middle:中间对齐right:右对齐texttop:顶线对齐top:顶部对齐behavior设定滚动的⽅式:alternate:表⽰在两端之间来回滚动。

scroll:表⽰由⼀端滚动到另⼀端,会重复。

slide:表⽰由⼀端滚动到另⼀端,不会重复scrollamount="5":设置滚动的速度direction设定活动字幕的滚动⽅向代码如下:<marquee direction="down">设定活动字幕的滚动⽅向direction="down":向下</marquee><marquee direction="left">设定活动字幕的滚动⽅向direction="left":向左</marquee><marquee direction="right">设定活动字幕的滚动⽅向direction="right":向右</marquee><marquee direction="up">设定活动字幕的滚动⽅向direction="up":向上</marquee>hspace设定活动字幕⾥所在的位置距离⽗容器⽔平边框的距离This controls the horizontal(⽔平)space around thedisplay box.代码如下:<table width="500"border="1" align="center" cellpadding="0"cellspacing="0"><tr><td><marquee hspace="100"bgcolor="#CCCCCC">hspace="100"</marquee></td></tr></table>loop设定滚动的次数,当loop=-1表⽰⼀直滚动下去,默认为-1Marquee标记⽤于在可⽤浏览区域中滚动⽂本。

网页对联广告代码效果大全

网页对联广告代码效果大全
followObj.style.top=followObj.offsetTop+dy;
}
followObj.style.display = '';
}
}
{
var followObj = collection[i].object;
var followObj_x = (typeof(collection[i].x)=='string'?eval(collection[i].x):collection[i].x);
}
}
function play()
{
if(screen.width<=800)
{
for(var i=0;i<collection.length;i++)
document.write(adhead1+ad_80[ad_id]+adhead2+ad_250[ad_id]+"</div>");
document.write ("</div>");
self.onError=null;
currentX = currentY = 0;
whichIt = null;
{
collection[i].object.style.display = 'none';
}
return;
}
for(var i=0;i<collection.length;i++)
document.all.div_80.style.visibility = 'hidden';

常用网页广告代码全集

常用网页广告代码全集

25:分组相关的图片导航 26: 分组相关的图片导航 27:分组相关的图片轮换 28:列表式广告代码演示 代码 1 下载 代码 2 下载 演示下载 下载
29:杂志式幻灯广告代码 30:影院模式幻灯广告代 31:易趣产品幻灯广告代 32:两侧翻牌的广告代码 演示下载 33:div+css 显示对联带 关闭代码下载 37:TOP 排列幻灯广告代 码下载 41:随图片快速翻动幻灯 代码下载 45:很不错的漂浮广告代 码下载 码演示下载 码演示下载 演示下载
66:网易顶部展出的大幅 67:包含 flash 的通栏滚 广告下载 动 banner 下载
70:flash+xml 图片轮换 71:调用灵活的 flash 焦 效果下载 点图轮换下载
73:可翻阅上一条下一条 滚动下载 77:FLASH+XML 迅雷影片 广告特效下载 81:四屏 flash 图片轮换 代码下载 85:沪江英语网 3 图弹性 广告下载 89:迅雷网七屏 flash 广 告轮换下载 93:flash 无限图片展示 广告下载
117:广告自动轮播代码演 118 :3 屏 Flash 竖焦点图 119: 不规则焦点图广告 示下载 广告演示 下鼠标移动提示的广告 码下载 代码下载
49:破 SP2 弹窗 24 小时弹 50 一次下载 53:关闭弹出两窗口的代 码下载 代码下载 动广告下载 下载 56:左边底部悬浮代码下 载 60:新浪 FLASH 切换广告 下载 64:仿 QQ 消息弹出广告效 果下载 68:MiniTabbedPages 雅 虎 TAB 下载 72: 附带缩略图的 JS 图片 轮换下载
105:3d 图片墙 flash+xml 106:360 度旋转展示 下载 109:四屏切换 JS 广告代 码下载 flash+xml 下载 110:JavaScript 图片切 换效果 下载

QQ空间免费漂浮物代码

QQ空间免费漂浮物代码

QQ空间免费漂浮物代码:javascript:window.top.space_addItem(5,609,0,0,1,1,0); 梦的希望javascript:window.top.space_addItem(5,1097,0,0,1,1,0); 爱情天使javascript:window.top.space_addItem(16,22101,300,80,500,500,0); 漂流瓶javascript:window.top.space_addItem(16,22099,300,80,500,500,0);菊花台javascript:window.top.space_addItem(16,22103,300,80,500,500,0);奇幻花园javascript:window.top.space_addItem(16,22105,300,80,500,500,0);做我自己javascript:window.top.space_addItem(16,22097,50,80,250,250,0);个性公主javascript:window.top.space_addItem(16,23238,330,80,600,600,0);悠扬芭蕾舞javascript:window.top.space_addItem(16,23236,330,80,600,600,0);心左至右javascript:window.top.space_addItem(16,23226,330,80,600,600,0);梦幻可爱哎你双心javascript:window.top.space_addItem(16,23228,330,80,600,600,0);两只小猴子javascript:window.top.space_addItem(16,23230,330,80,600,600,0);下雪javascript:window.top.space_addItem(16,23232,50,80,620,350,0);下星星javascript:window.top.space_addItem(16,23214,350,80,500,600,0);雪右至左javascript:window.top.space_addItem(16,23699,330,80,600,600,0);下雪了javascript:window.top.space_addItem(16,23699,330,80,600,600,0);雪绒花javascript:window.top.space_addItem(16,23732,350,80,500,600,0);漂浮上升红色雪花javascript:window.top.space_addItem(16,23725,350,80,500,600,0);214我爱你流星javascript:window.top.space_addItem(16,23212,330,80,600,600,0);四散黄点javascript:window.top.space_addItem(16,23734,350,80,500,600,0);彩色圆点上升javascript:window.top.space_addItem(16,23234,50,80,620,350,0);黑蝶javascript:window.top.space_addItem(16,23736,150,80,620,350,0);红色烟花QQ空间去横幅代码:javascript:window.top.space_addItem(19,15330,0,0,0,0,10000);(因为默认的横幅没编号,所以这个qq空间去横幅代码只能黄钻使用了)QQ空间免费挂件代码:javascript:window.top.space_addItem(2,5875,0,0,1,1,0);javascript:window.top.space_addItem(2,5876,0,0,1,1,0);javascript:window.top.space_addItem(2,5877,0,0,1,1,0);javascript:window.top.space_addItem(2,5878,0,0,1,1,0);javascript:window.top.space_addItem(2,5879,0,0,1,1,0);javascript:window.top.space_addItem(2,5880,0,0,1,1,0);javascript:window.top.space_addItem(2,5881,0,0,1,1,0);javascript:window.top.space_addItem(16,14430,0,0,200,200,0);javascript:window.top.space_addItem(16,14431,0,0,200,200,0);javascript:window.top.space_addItem(16,14429,0,0,200,200,0);javascript:window.top.space_addItem(16,14428,0,0,200,200,0);javascript:window.top.space_addItem(2,5875,0,0,1,1,0);QQ空间皮肤代码黑暗世界javascript:window.top.space_addItem(1,9475,0,0,1,1,94);快乐十分javascript:window.top.space_addItem(1,8674,0,80,100,100,94);静悄悄javascript:window.top.space_addItem(1,8669,100,80,100,100,94);蓝色javascript:window.top.space_addItem(1,11762,0,0,96,96,94);全红javascript:window.top.space_addItem(1,11273,0,80,0,0,93);可爱_浪漫javascript:window.top.space_addItem(1,4703,0,80,0,0,94);浪漫爱情javascript:window.top.space_addItem(1,7513,0,80,0,0,94);免费黑色皮肤代码javascript:window.top.space_addItem(1,12736,0,80,0,0,93);黄色免费皮肤代码javascript:window.top.space_addItem(1,7513,0,80,0,0,93);紫色免费皮肤代码javascript:window.top.space_addItem(1,7510,0,80,0,0,93);绿色免费皮肤代码javascript:window.top.space_addItem(1,7619,0,80,0,0,93);白色免费皮肤代码javascript:window.top.space_addItem(1,4703,0,80,0,0,94);灰色免费皮肤代码javascript:window.top.space_addItem(1,6300,0,0,0,0,1);灰色免费皮肤代码(小窝)javascript:window.top.space_addItem(1,2882,0,0,0,1,1);强生可伶可俐javascript:window.top.space_addItem(1,10425,0,0,0,1,1);强生可伶可俐两个美女javascript:window.top.space_addItem(1,10144,0,0,0,1,0);强生广告美女一个美女javascript:window.top.space_addItem(1,11762,0,0,0,1,1);全屏天蓝色javascript:window.top.space_addItem(1,11762,0,0,0,1,94);玫瑰花javascript:window.top.space_addItem(1,8669,100,80,100,100,123); 字串2静悄悄javascript:window.top.space_addItem(1,8669,100,80,100,100,94); (带花、居中)快乐十分javascript:window.top.space_addItem(1,8674,0,80,100,100,94); (彩虹)迷失世界javascript:window.top.space_addItem(1,9475,0,0,1,1,94);(这个是黑的)蓝色javascript:window.top.space_addItem(1,11762,0,0,96,96,94); (蓝的)睡美人(很漂亮)javascript:window.top.space_addItem(13,9758,0,0,200,600,0);白色可爱风格:javascript:window.top.space_addItem(1,4703,0,80,0,0,94); 字串8浪漫爱情系列:javascript:window.top.space_addItem(1,7513,0,80,0,0,94);全红免费皮肤:javascript:window.top.space_addItem(1,11273,0,80,0,0,93);全橙样式:javascript:window.top.space_addItem(1,15306,0,80,0,0,93);全蓝样式:javascript:window.top.space_addItem(1,15116,0,80,0,0,93);全紫样式:javascript:window.top.space_addItem(1,15116,0,80,0,0,93);淡淡粉色:javascript:window.top.space_addItem(1,7513,0,80,0,0,93);全绿样式:javascript:window.top.space_addItem(1,7619,0,80,0,0,93);字串7javascript:window.top.space_addItem(2,5876,0,0,1,1,0);javascript:window.top.space_addItem(2,5877,0,0,1,1,0);javascript:window.top.space_addItem(2,5878,0,0,1,1,0);字串4javascript:window.top.space_addItem(1,9465,0,80,0,0,90);javascript:window.top.space_addItem(1,9361,0,80,0,0,90);javascript:window.top.space_addItem(1,9362,0,80,0,0,90);javascript:window.top.space_addItem(1,8980,0,80,0,0,90);javascript:window.top.space_addItem(1,8974,0,80,0,0,90);javascript:window.top.space_addItem(1,8032,0,80,0,0,90);javascript:window.top.space_addItem(1,7981,0,80,0,0,90);javascript:window.top.space_addItem(1,7288,0,80,0,0,90);javascript:window.top.space_addItem(1,7182,0,80,0,0,90);javascript:window.top.space_addItem(1,7183,0,80,0,0,90);javascript:window.top.space_addItem(1,6729,0,80,0,0,90);javascript:window.top.space_addItem(1,6549,0,80,0,0,90);javascript:window.top.space_addItem(1,6550,0,80,0,0,90);javascript:window.top.space_addItem(1,6551,0,80,0,0,90);javascript:window.top.space_addItem(1,6552,0,80,0,0,90);猪javascript:window.top.space_addItem(1,6553,0,80,0,0,90);javascript:window.top.space_addItem(1,6554,0,80,0,0,90);javascript:window.top.space_addItem(1,6556,0,80,0,0,90);javascript:window.top.space_addItem(1,6557,0,80,0,0,90);javascript:window.top.space_addItem(1,6559,0,80,0,0,90);javascript:window.top.space_addItem(1,6398,0,80,0,0,90);javascript:window.top.space_addItem(1,6399,0,80,0,0,90);javascript:window.top.space_addItem(1,6400,0,80,0,0,90);还好javascript:window.top.space_addItem(1,6401,0,80,0,0,90);javascript:window.top.space_addItem(1,6274,0,80,0,0,90);javascript:window.top.space_addItem(1,6071,0,80,0,0,90);javascript:window.top.space_addItem(1,3675,0,80,0,0,90);javascript:window.top.space_addItem(1,2942,0,80,0,0,90);javascript:window.top.space_addItem(1,2875,0,80,0,0,90);javascript:window.top.space_addItem(1,2877,0,80,0,0,90);javascript:window.top.space_addItem(1,2876,0,80,0,0,90);javascript:window.top.space_addItem(1,2668,0,80,0,0,90);javascript:window.top.space_addItem(1,2468,0,80,0,0,90);javascript:window.top.space_addItem(1,2467,0,80,0,0,90);javascript:window.top.space_addItem(1,2464,0,80,0,0,90);javascript:window.top.space_addItem(1,2465,0,80,0,0,90);javascript:window.top.space_addItem(1,2466,0,80,0,0,90);javascript:window.top.space_addItem(1,3785,0,80,0,0,90);javascript:window.top.space_addItem(1,3677,0,80,0,0,90);javascript:window.top.space_addItem(1,3206,0,80,0,0,90);javascript:window.top.space_addItem(1,1028,0,80,0,0,90);javascript:window.top.space_addItem(1,1770,0,80,0,0,90);javascript:window.top.space_addItem(1,1773,0,80,0,0,90);javascript:window.top.space_addItem(1,1109,0,80,0,0,90);javascript:window.top.space_addItem(1,1629,0,80,0,0,90);javascript:window.top.space_addItem(1,1113,0,80,0,0,90);javascript:window.top.space_addItem(1,1108,0,80,0,0,90);javascript:window.top.space_addItem(1,1107,0,80,0,0,90);javascript:window.top.space_addItem(1,1034,0,80,0...(javascript:window.top.space_addItem(1,15306,0,0,1,1,94); QQ这声QQ三国官方皮肤javascript:window.top.space_addItem(1,15166,0,80,0,0,94);。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

飘浮、对联及悬浮广告代码大全(2011-01-10 16:51:25)转载分类:技术文章标签:飘浮对联悬浮广告代码大全去过新浪或者搜狐吗?虽然我们都不愿意看广告,但是它们做广告的技术我们却应该学到手,这不,又一种很流行的做法儿,做成那种两边对称的对联式的广告,而最醒目的地方还有一个关闭的小按扭,这是不是比弹出的小广告更让人容易接受一些呢,你愿意看就看,不愿意看就点击那个按扭关掉,的确是比那种被人家3721或是其它IE插件拦截掉的小弹出广告效果和功能好了许多,而那个对联式广告中的关闭按扭的制作也是有一点学问的。

我们姑且不论如何制作对联Flash 广告,而主要讲一下那个广告里的小X(关闭按扭)的代码,以及和外部的接合。

具体步骤如下:画一个小X式的图形,这应该不难吧?全部选中后,按下F8键转化成一个“按扭”组件,点击选中这个小按扭后,按下F9键打开动作面板,添加以下代码: on (release) { getURL("FSCommand:", ""); } 就这么简单吗?对,在Flash里就是这么简单了,当然,还要在网页里做以下工作。

这里我们多运用一些javascript的东西来做我们这个代码块儿移植性很好的对联。

全部代码如下:居顶,不随下拉条滚动的广告代码<!-- duilian begin --><SCRIPT language=javascript event=FSCommand() for=dl>duilian2.style.visibility='hidden';duilian3.style.visibility='hidden';</SCRIPT> <SCRIPT language=javascript>function winload(){duilian2.style.top=20;duilian2.style.left=5;duilian3.style.top=20;duilian3.style.right=5;}//if(document.body.offsetWidth>800){{document.write("<div id=duilian2 style='position:absolute;visibility:visible;z-index:1'><EMBED src='1.swf' quality=high WIDTH=100 HEIGHT=300 TYPE='application/x-shockwave-flash'id=dl></EMBED></div>"+"<div id=duilian3 style='position:absolute;visibility:visible;z-index:1'><EMBED src='1.swf' quality=high WIDTH=100 HEIGHT=300 TYPE='application/x-shockwave-flash'id=dl></EMBED></div>");}winload()//}</SCRIPT>随下拉条滚动的广告代码<SCRIPT FOR='EccoolAd' EVENT='fscommand()' LANGUAGE='javascript'> AdLayer1.style.visibility='hidden';AdLayer2.style.visibility='hidden';</script><script>function initEcAd() {document.all.AdLayer1.style.posTop = -200;document.all.AdLayer1.style.visibility = 'visible'document.all.AdLayer2.style.posTop = -200;document.all.AdLayer2.style.visibility = 'visible'MoveLeftLayer('AdLayer1');MoveRightLayer('AdLayer2');}function MoveLeftLayer(layerName) {var x = 5;var y = 50;var diff = (document.body.scrollTop + y -document.all.AdLayer1.style.posTop)*.40;var y = document.body.scrollTop + y - diff;eval_r("document.all." + layerName + ".style.posTop = y");eval_r("document.all." + layerName + ".style.posLeft = x"); setTimeout("MoveLeftLayer('AdLayer1');", 20);}function MoveRightLayer(layerName) {var x = 5;var y = 50;document.all.AdLayer2.style.posTop)*.40;var y = document.body.scrollTop + y - diff;eval_r("document.all." + layerName + ".style.posTop = y");eval_r("document.all." + layerName + ".style.posRight = x"); setTimeout("MoveRightLayer('AdLayer2');", 20);}document.write("<div id=AdLayer1 style='position:absolute;visibility:hidden;z-index:1'><EMBED src='1.swf' quality=high WIDTH=100 HEIGHT=300 TYPE='application/x-shockwave-flash'id=dl></EMBED></div>"+"<div id=AdLayer2 style='position:absolute;visibility:hidden;z-index:1'><EMBED src='1.swf' quality=high WIDTH=100 HEIGHT=300 TYPE='application/x-shockwave-flash'id=dl></EMBED></div>");initEcAd()</script>或者:广告代码<!--以下网页对联广告代码-->function initEcAd() {document.all.AdLayer1.style.posTop = -200;document.all.AdLayer1.style.visibility = 'visible'document.all.AdLayer2.style.posTop = -200;document.all.AdLayer2.style.visibility = 'visible'MoveLeftLayer('AdLayer1');MoveRightLayer('AdLayer2');}function MoveLeftLayer(layerName) {var x = 5;var y = 165 ;var diff = (document.body.scrollTop + y -document.all.AdLayer1.style.posTop)*.40;var y = document.body.scrollTop + y - diff;eval_r("document.all." + layerName + ".style.posTop = y");eval_r("document.all." + layerName + ".style.posLeft = x"); setTimeout("MoveLeftLayer('AdLayer1');", 20);}function MoveRightLayer(layerName) {var x = 5;var y = 165;document.all.AdLayer2.style.posTop)*.40;var y = document.body.scrollTop + y - diff;eval_r("document.all." + layerName + ".style.posTop = y");eval_r("document.all." + layerName + ".style.posRight = x"); setTimeout("MoveRightLayer('AdLayer2');", 20);}document.write("<div id=AdLayer1 style='position:absolute;visibility:hidden;z-index:1'><ahref=“” target=_blank ><img src=图片地址 border=0></a></div>" +"<div id=AdLayer2 style='position:absolute;visibility:hidden;z-index:1'><a href=连接地址 target=_blank ><img src=图片地址 border=0></a></div>"); initEcAd()[color=White][color=Red]把上面的代码另存为一个*.JS文件,然后在想实现此效果的页面<head></head>之间加上一列代码:[/color][/color]程序代码<SCRIPT FOR='EccoolAd' EVENT='fscommand()' LANGUAGE='JavaScript'> AdLayer1.style.visibility='hidden';AdLayer2.style.visibility='hidden';</script><script src="/blog/ggao.js>";</script>程序代码<!-- 对联开始 --><SCRIPT language=javascript event=FSCommand() for=dl>duilian2.style.visibility='hidden';duilian3.style.visibility='hidden';</SCRIPT><SCRIPT language=javascript>function winload(){duilian2.style.top=20;duilian2.style.left=5;duilian3.style.top=20;duilian3.style.right=5;}//if(document.body.offsetWidth>800){{document.write("<div id=duilian2 style='position:absolute;visibility:visible;z-index:1'><EMBED src='duilian.swf' quality=high WIDTH=100 HEIGHT=300 TYPE='application/x-shockwave-flash'id=dl></EMBED></div>"+"<div id=duilian3 style='position:absolute;visibility:visible;z-index:1'><EMBED src='duilian.swf' quality=high WIDTH=100 HEIGHT=300 TYPE='application/x-shockwave-flash' id=dl></EMBED></div>");}winload()//}</SCRIPT><!-- 对联结束 -->整个这一部分包含了两段JS代码块,从第一个看以看出是设置当对联Flash中发生事件眯FSCommand()时duilian2和duilian3的visibility(可见)属性为hidden(隐藏)。

相关文档
最新文档