当前位置:首页 > 代码 > 正文

全屏下拉广告代码(全屏弹窗广告)

admin 发布:2022-12-19 20:09 164


本篇文章给大家谈谈全屏下拉广告代码,以及全屏弹窗广告对应的知识点,希望对各位有所帮助,不要忘了收藏本站喔。

本文目录一览:

急需要,求一段网页全屏广告的JS代码.

html

title/title

head

script language="javascript" type="text/javascript"

function closediv()

{

document.getElementById("hidediv").style.visibility="hidden";

}

/script

/head

body onload="setTimeout('closediv()',5000)"

div id="hidediv" style="visibility:visible"ok/div

/body

/html

五秒后关闭层。你试试改下

求一段全屏广告代码

!--头部广告开始--

div name="FlatLayer" id="FlatLayer" style="display:none;" align="center"table width="100%" border="0" cellpadding="0" cellspacing="0" align="center"

tr

td align="center"img src="包装效果图.jpg" border="0" width="760" height="301"/td

/tr

/table/div

!--头部广告结束--

script language="javascript"

function ShowLayer()

{

document.all.FlatLayer.style.display="block";

}

function CloseLayer()

{

document.all.FlatLayer.style.display="none";

}

ShowLayer();

setTimeout("CloseLayer()",5000);//这里是广告显示的时间

/script

自动收缩的

!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" ""

HTML xmlns=""

HEADTITLEnew/TITLE

META http-equiv=Content-Type content="text/html; charset=gb2312"

META content="Microsoft FrontPage 6.0" name=GENERATOR/HEAD

BODY

SCRIPT language=javascript type=text/javascript

var hmax = 625-1;//最大高度

var hmin = 25;//最小高度

var h=0;

function addCount(){

if(hhmax){

h += 20;

setTimeout("addCount()",1);

}

else {

h=hmax;

setTimeout("noneAds()",3000); //停留时间自己适当调整 1000 = 1秒

document.getElementById("adsOPEN").style.display = "none";

}

document.getElementById("ads").style.display = "";

document.getElementById("ads").style.height = h+"px";

}

window.onload = function showAds(){

document.getElementById("ads").style.display = "none";

document.getElementById("ads").style.height = "0px";

addCount(); //慢慢打开

// h=hmax;

// setTimeout("noneAds()",3000); //停留时间自己适当调整 1000 = 1秒

}

function openAds(){

h = 0;//高度

addCount(); //慢慢打开

}

function noneAds(){

if(hhmin) {

h -= 20;

setTimeout("noneAds()",1);

}

else {

h = hmin;

document.getElementById("ads").style.display = "none";

document.getElementById("adsOPEN").style.display = "";

return;

}

document.getElementById("ads").style.height = h+"px";

}

/SCRIPT

DIV id=ads style="OVERFLOW: hidden; TOP: 0px; TEXT-ALIGN: center;display:none"

img src="王绍勇/包装效果图.jpg" width="1698" height="832" /

/DIV

DIV id=adsOPEN style="OVERFLOW: hidden; TEXT-ALIGN: center"

A href="javascript:openAds()"img src="" width="1404" height="846" //A

/DIV

/BODY/HTML

求一个右下角的漂浮广告代码?

右下角漂浮广告代码使用方法(一): 将以下代码以**.js文件形式保存,在模板中调用这个js文件即可

(备注该代码的图片大小为250*150 代码里面有参数自己看下就知道了)document.writeln("div id=\"qqaddiv\" style=\"position:absolute; z-index: 100;\" ");

document.writeln("a href=链接地址 target=_blankimg src=图片链接地址 border=0/a");

document.writeln("/div");

var bodyfrm = ( document.compatMode.toLowerCase()=="css1compat" ) ? document.documentElement : document.body;

var adst = document.getElementById("qqaddiv").style;

adst.top = ( bodyfrm.clientHeight - 150 ) + "px";

adst.left = ( bodyfrm.clientWidth - 250 ) + "px";

function moveR() {

adst.top = ( bodyfrm.scrollTop + bodyfrm.clientHeight - 150 ) + "px";

adst.left = ( bodyfrm.scrollLeft + bodyfrm.clientWidth - 250 ) + "px";

}

setInterval("moveR();", 80); 右下角漂浮广告代码使用方法(二): var qq_etewidth = 259;

var qq_eteheight = 158;

var qq_banner_filename = "广告图片链接地址";

var qq_gotoUrl = '广告链接地址';document.write("div id=eteUnionUpFloat style='margin:0px;padding-bottom:300px;z-index: 10;position:absolute;width:"+qq_etewidth+"px;height:"+qq_eteheight+"px;'")

document.write("a href='"+qq_gotoUrl+"' target='_blank'img src='"+qq_banner_filename+"' border='0' style='cursor: hand;' width='"+qq_etewidth+"' height='"+qq_eteheight+"'/a")

document.write("/div")

var bodyfrm = ( document.compatMode.toLowerCase()=="css1compat" ) ? document.documentElement : document.body;

var adst = document.getElementById("eteUnionUpFloat").style;

adst.top = ( bodyfrm.clientHeight - qq_eteheight ) + "px";

adst.left = ( bodyfrm.clientWidth - qq_etewidth ) + "px";

function moveR() {

adst.top = ( bodyfrm.scrollTop + bodyfrm.clientHeight - qq_eteheight ) + "px";

adst.left = ( bodyfrm.scrollLeft + bodyfrm.clientWidth - qq_etewidth ) + "px";

}

var objTimer=setInterval("moveR();", 100);function CloseX(){

adst.display='none';

}function ete_closediv()

{

document.getElementById('eteUnionUpFloat').style.visibility='hidden';

if(objTimer) window.clearInterval(objTimer)

}

网页右边跟随滚动条上下移动的小广告是怎么做的?请高手给我代码

左栏浮动广告

script language=javascriptvar specialcode="DIV id=searchspe style='Z-INDEX: script language=javascriptvar specialcode="DIV id=searchspe style='Z-INDEX: 100; right: 1px; POSITION: absolute; TOP: 180px;'TABLE cellSpacing=0 cellPadding=0 width=150 style='border-left:1px solid #2E6287;border-top:1px solid #2E6287;border-right:1px solid #2E6287;font-size:12px;color:#ffffff; border-bottom-color:#2E6287; border-bottom-width:1px'TR bgcolor=#2E6287TD height=20 推荐↓/TDTD style='CURSOR: hand' onclick=searchspe.style.visibility='hidden' width=30关 闭/TD/TR/TABLEtable border='1' width='150' height='500' bordercolor='#2E6287'trtd广告内容/td/tr/table/DIV";document.write(specialcode);lastScrollY=0;function heartBeat0(){diffY=document.body.scrollTop;percent=.1*(diffY-lastScrollY);if(percent0)percent=Math.ceil(percent);else percent=Math.floor(percent);document.all.searchspe.style.pixelTop+=percent;lastScrollY=lastScrollY+percent;}window.setInterval("heartBeat0()",1);/script

右栏浮动广告

script language=javascriptvar specialcode="DIV id=searchspe style='Z-INDEX: 100; left: 1px; POSITION: absolute; TOP: 50px;'TABLE cellSpacing=0 cellPadding=0 width=360 style='border-left:1px solid #333333;border-top:1px solid #333333;border-right:1px solid #333333;font-size:12px;color:#ffffff'TR bgcolor=#2E6287TD height=20 推荐↓/TDTD style='CURSOR: hand' onclick=searchspe.style.visibility='hidden' width=30关 闭/TD/TR/TABLEtable border='1' width='150' id='table1' bordercolor='#2E6287' height='500'trtd广告内容/td/tr/table/DIV";document.write(specialcode);lastScrollY=0;function heartBeat0(){diffY=document.body.scrollTop;percent=.1*(diffY-lastScrollY);if(percent0)percent=Math.ceil(percent);else percent=Math.floor(percent);document.all.searchspe.style.pixelTop+=percent;lastScrollY=lastScrollY+percent;}window.setInterval("heartBeat0()",1);/script

左栏固定广告

DIV id=searchspe style='Z-INDEX: 100; left: 1px; POSITION: absolute; TOP: 50px;'TABLE cellSpacing=0 cellPadding=0 width=360 style='border-left:1px solid #333333;border-top:1px solid #333333;border-right:1px solid #333333;font-size:12px;color:#ffffff'TR bgcolor=#2E6287TD height=20 推荐↓/TDTD style='CURSOR: hand' onclick=searchspe.style.visibility='hidden' width=30关 闭/TD/TR/TABLE广告内容/DIV

右栏固定广告

DIV id=searchspe style='Z-INDEX: 100; right: 1px; POSITION: absolute; TOP: 50px;'TABLE cellSpacing=0 cellPadding=0 width=360 style='border-left:1px solid #333333;border-top:1px solid #333333;border-right:1px solid #333333;font-size:12px;color:#ffffff'TR bgcolor=#2E6287TD height=20 推荐↓/TDTD style='CURSOR: hand' onclick=searchspe.style.visibility='hidden' width=30关 闭/TD/TR/TABLE广告内容/DIV

漂浮广告代码

div id="img" style="position:absolute;; width: 200; height: 151"广告内容/div

script LANGUAGE="JavaScript"

var xPos = 20;

var yPos = 10;

img.style.left= xPos;

img.style.top = yPos;

var step = 1;

var delay = 30;

var width,height,Hoffset,Woffset;

var y = 1;

var x = 1;

var interval;

img.visibility = "visible";

function changePos()

{

width = document.body.clientWidth;

height = document.body.clientHeight;

Hoffset = img.offsetHeight;

Woffset = img.offsetWidth;

if (y)

{

yPos = yPos + step;

}

else

{

yPos = yPos - step;

}

if (yPos 0)

{

y = 1;

yPos = 0;

}

if (yPos = (height - Hoffset))

{

y = 0;

yPos = (height - Hoffset);

}

if (x)

{

xPos = xPos + step;

}

else

{

xPos = xPos - step;

}

if (xPos 0)

{

x = 1;

xPos = 0;

}

if (xPos = (width - Woffset))

{

x = 0;

xPos = (width - Woffset);

}

img.style.left = xPos + document.body.scrollLeft;

img.style.top = yPos + document.body.scrollTop;

}

function start()

{

interval = setInterval('changePos()', delay);

}

function pause_resume()

{

clearInterval(interval);

}

start();

/script

固定对联

DIV id=searchspe style='Z-INDEX: 100; right: 5px; POSITION: absolute; TOP: 50px;'TABLE cellSpacing=0 cellPadding=0 width=150 style='font-size:12px;color:#ffffff'TR bgcolor=#C54A00TD height=20 推荐↓/TDTD style='CURSOR: hand' onclick=searchspe.style.visibility='hidden' width=30关 闭/TD/TR/TABLE

广告内容/DIVDIV id=searchspe2 style='Z-INDEX: 100; left: 5px; POSITION: absolute; TOP: 50px;'TABLE cellSpacing=0 cellPadding=0 width=150 style='font-size:12px;color:#ffffff'TR bgcolor=#12BDFFTD height=20 推荐↓/TDTD style='CURSOR: hand' onclick=searchspe2.style.visibility='hidden' width=30关 闭/TD/TR/TABLE

广告内容/DIV

随动对联

script language=javascriptfunction close163news(){searchspe.style.visibility='hidden';searchspe2.style.visibility='hidden';} var specialcode="DIV id=searchspe style='Z-INDEX: 100; right: 1px; POSITION: absolute; TOP: 30px;'TABLE cellSpacing=0 cellPadding=0 width=150 style='font-size:12px;color:#ffffff'TR bgcolor=#C54A00TD height=20 推荐↓/TDTD style='CURSOR: hand' onclick='close163news()' width=30关 闭/TD/TR/TABLE广告内容/DIV";document.write(specialcode);lastScrollX=0;function heartBeat0(){diffY=document.body.scrollTop;percent=.1*(diffY-lastScrollX);if(percent0)percent=Math.ceil(percent);else percent=Math.floor(percent);document.all.searchspe.style.pixelTop+=percent;lastScrollX=lastScrollX+percent;}window.setInterval("heartBeat0()",1);var specialcode2="DIV id=searchspe2 style='Z-INDEX: 100; left: 1px; POSITION: absolute; TOP: 30px;'TABLE cellSpacing=0 cellPadding=0 width=150 style='font-size:12px;color:#ffffff'TR bgcolor=#12BDFFTD height=20 推荐↓/TDTD style='CURSOR: hand' onclick='close163news()' width=30关 闭/TD/TR/TABLE广告内容/DIV";document.write(specialcode2);lastScrollY=0;function heartBeat1(){diffY=document.body.scrollTop;percent=.1*(diffY-lastScrollY);if(percent0)percent=Math.ceil(percent);else percent=Math.floor(percent);document.all.searchspe2.style.pixelTop+=percent;lastScrollY=lastScrollY+percent;}window.setInterval("heartBeat1()",1);/script

qq好友上线广告代码

!-- 代码开始 请将下面的代码放到body结束标签之前--

DIV id=eMeng

style="BORDER-RIGHT: #455690 1px solid; BORDER-TOP: #a6b4cf 1px solid; Z-INDEX: 99999; LEFT: 64px; VISIBILITY: hidden; BORDER-LEFT: #a6b4cf 1px solid; WIDTH: 168px; BORDER-BOTTOM: #455690 1px solid; POSITION: absolute; TOP: 374px; HEIGHT: 115px; BACKGROUND-COLOR: #c9d3f3"

TABLE style="BORDER-TOP: #ffffff 1px solid; BORDER-LEFT: #ffffff 1px solid"

cellSpacing=0 cellPadding=0 width="100%" bgColor=#cfdef4 border=0

TBODY

TR

TD

style="FONT-SIZE: 12px; BACKGROUND-IMAGE: none; COLOR: #0f2c8c"

width=30 height=24 /TD

TD

style="PADDING-LEFT: 4px; FONT-WEIGHT: normal; FONT-SIZE: 12px; BACKGROUND-IMAGE: none; COLOR: #1f336b; PADDING-TOP: 4px"

vAlign=center width="100%"span class="style13"本站提示/span/TD

TD vAlign=center align=right width=19 2px? padding-top: 2px;

padding-right:SPAN title=关闭

style="FONT-WEIGHT: bold; FONT-SIZE: 12px; CURSOR: hand; COLOR: red; MARGIN-RIGHT: 4px"

onclick=closeDiv()×/SPAN/TD/TR

TR

TD

style="PADDING-RIGHT: 1px; BACKGROUND-IMAGE: none; PADDING-BOTTOM: 1px"

colSpan=3 height=90DIV

style="BORDER-RIGHT: #b9c9ef 1px solid; PADDING-RIGHT: 13px; BORDER-TOP: #728eb8 1px solid; PADDING-LEFT: 13px; FONT-SIZE: 12px; PADDING-BOTTOM: 13px; BORDER-LEFT: #728eb8 1px solid; WIDTH: 100%; COLOR: #1f336b; PADDING-TOP: 18px; BORDER-BOTTOM: #b9c9ef 1px solid; HEIGHT: 100%"

div align="left" span style="text-decoration: none"

FONT

color=#FF0000仿造qq好友上线br

center /center

/FONT/span/div

/DIV/td/tr/table

SCRIPT language=JavaScript

window.onload = getMsg;

window.onresize = resizeDiv;

window.onerror = function(){}

var divTop,divLeft,divWidth,divHeight,docHeight,docWidth,objTimer,i = 0;

function getMsg()

{

try{

divTop = parseInt(document.getElementById("eMeng").style.top,10)

divLeft = parseInt(document.getElementById("eMeng").style.left,10)

divHeight = parseInt(document.getElementById("eMeng").offsetHeight,10)

divWidth = parseInt(document.getElementById("eMeng").offsetWidth,10)

docWidth = document.body.clientWidth;

docHeight = document.body.clientHeight;

document.getElementById("eMeng").style.top = parseInt(document.body.scrollTop,10) + docHeight + 10;// divHeight

document.getElementById("eMeng").style.left = parseInt(document.body.scrollLeft,10) + docWidth - divWidth

document.getElementById("eMeng").style.visibility="visible"

objTimer = window.setInterval("moveDiv()",10)

}

catch(e){}

}

function resizeDiv()

{

try{

divHeight = parseInt(document.getElementById("eMeng").offsetHeight,10)

divWidth = parseInt(document.getElementById("eMeng").offsetWidth,10)

docWidth = document.body.clientWidth;

docHeight = document.body.clientHeight;

document.getElementById("eMeng").style.top = docHeight - divHeight + parseInt(document.body.scrollTop,10)

document.getElementById("eMeng").style.left = docWidth - divWidth + parseInt(document.body.scrollLeft,10)

}

catch(e){}

}

function moveDiv()

{

try

{

if(parseInt(document.getElementById("eMeng").style.top,10) = (docHeight - divHeight + parseInt(document.body.scrollTop,10)))

{

window.clearInterval(objTimer)

objTimer = window.setInterval("resizeDiv()",1)

}

divTop = parseInt(document.getElementById("eMeng").style.top,10)

document.getElementById("eMeng").style.top = divTop - 1

}

catch(e){}

}

function closeDiv()

{

document.getElementById('eMeng').style.visibility='hidden';

if(objTimer) window.clearInterval(objTimer)

}

/SCRIPT

!-- 代码复制结束 --

页面悬浮广告代码

脚本说明:

把如下代码加入body区域中

SCRIPT FOR=window EVENT=onload LANGUAGE="JavaScript"

initAd();//载入页面后,调用函数initAd()

/SCRIPT

script language="JavaScript"

!--

function initAd() {

document.all.AdLayer.style.posTop = -200;

//设置onLoad事件激发以后,广告层相对于固定后的y方向位置

document.all.AdLayer.style.visibility = 'visible'//设置层为可见

MoveLayer('AdLayer');//调用函数MoveLayer()

}

function MoveLayer(layerName) {

var x = 600;//浮动广告层固定于浏览器的x方向位置

var y = 300;//浮动广告层固定于浏览器的y方向位置

var diff = (document.body.scrollTop + y - document.all.AdLayer.style.posTop)*.40;

var y = document.body.scrollTop + y - diff;

eval("document.all." + layerName + ".style.posTop = y");

eval("document.all." + layerName + ".style.posLeft = x");//移动广告层

setTimeout("MoveLayer('AdLayer');", 20);//设置20毫秒后再调用函数MoveLayer()

}

//--

/script

!--下面为一个ID为AdLayer的层(如ID名不为AdLayer,

上面MoveLayer()内的AdLayer也要作相应修改),包括一张带链接的图片--

div id=AdLayer style='position:absolute; width:61px; height:59px; z-index:20; visibility:hidden;; left: 600px; top: 300px'

a href=""img src='' border="0" height="31" width="88"/a

/div

求一个网站首页全屏大图广告的代码!可以关闭的

在js里面,刚刚进来的时候加个div(就是放那个大图的),在div右上角加个关闭按钮,点击消失div,设置定时器10秒消失div。

全屏下拉广告代码的介绍就聊到这里吧,感谢你花时间阅读本站内容,更多关于全屏弹窗广告、全屏下拉广告代码的信息别忘了在本站进行查找喔。

版权说明:如非注明,本站文章均为 AH站长 原创,转载请注明出处和附带本文链接;

本文地址:http://ahzz.com.cn/post/22271.html


取消回复欢迎 发表评论:

分享到

温馨提示

下载成功了么?或者链接失效了?

联系我们反馈

立即下载