㈠ 頁面懸浮廣告代碼
腳本說明:
把如下代碼加入<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="http://linhe.net"><img src='http://linhe.net/logo.gif' border="0" height="31" width="88"></a>
</div>
㈡ 網頁懸浮廣告怎麼消除,懸浮廣告怎麼屏蔽
1.打開瀏覽器,點擊右邊的"工具"菜單,選擇"選項"。
2.在彈出的選項窗口中選擇"廣告過濾"。
3.點擊右邊的"開啟攔截",再點擊「攔截所有廣告,使用Adblock此選項,瀏覽器會自動保存修改後的設置。
4.回到彈出廣告的頁面,按F5廣告就會被關閉。
㈢ 拍視頻上面怎樣懸浮廣告字
拍視頻上面想要懸浮廣告字的話,可以拍完視頻後用會聲會影。進行後期的製作。在視頻上面加上懸浮的廣告字就可以了,特別簡單。
㈣ 去想在自己的網站上添加客戶咨詢的懸浮窗口怎麼添加是不是獲取代碼後加進自己的網站就可
如果是像頁面廣告那樣的懸浮窗,從網上down一個html+css代碼拷貝到前端頁面中就可以了,如果要實現客戶咨詢聊天這樣的功能,就需要與後台進行交互,單純用html+css只能控制彈出一個窗口,通信一般是通過ajax或者activeX來實現的,此時後台需要有交互的代碼。還有一種是通過公用的聯系方式如qq這種也是只用拷貝代碼就可以的。
㈤ 如何在別人的網頁中,插入自己的懸浮小廣告呢
滑鼠右擊打開審查元素,找到入口加入你想加入的廣告,一般的網頁都可以加,基本上很少會做防禦
㈥ 做了網頁,怎麼設置廣告鏈接和懸浮廣告
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.object.style.display= 'none';}return;}for(var i=0;i<collection.length;i++){var followObj= collection.object;var followObj_x= (typeof(collection.x)=='string'?eval(collection.x):collection.x);var followObj_y= (typeof(collection.y)=='string'?eval(collection.y):collection.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= '';}}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文件,然後在想實現此效果的頁面用<script type="text/javascript" language="javascript1.2" src="*.js"></SCRIPT>調用即可,*代表你另存的文件名!注意修改廣告圖片地址和連接地址!
㈦ 網頁中如何做對聯懸浮廣告
1. 左欄浮動廣告
QUOTE:
<script language=javascript>var specialcode="<DIV id=searchspe style='Z-INDEX: <script language=javascript>var 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=#2E6287><TD height=20> 推薦↓</TD><TD style='CURSOR: hand' onclick=searchspe.style.visibility='hidden' width=30>關 閉</TD></TR></TABLE><table border='1' width='150' height='500' bordercolor='#2E6287'><tr><td>廣告內容</td></tr></table></DIV>";document.write(specialcode);lastScrollY=0;function heartBeat0(){diffY=document.body.scrollTop;percent=.1*(diffY-lastScrollY);if(percent>0)percent=Math.ceil(percent);else percent=Math.floor(percent);document.all.searchspe.style.pixelTop+=percent;lastScrollY=lastScrollY+percent;}window.setInterval("heartBeat0()",1);</script>
2.右欄浮動廣告
QUOTE:
<script language=javascript>var 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=#2E6287><TD height=20> 推薦↓</TD><TD style='CURSOR: hand' onclick=searchspe.style.visibility='hidden' width=30>關 閉</TD></TR></TABLE><table border='1' width='150' id='table1' bordercolor='#2E6287' height='500'><tr><td>廣告內容</td></tr></table></DIV>";document.write(specialcode);lastScrollY=0;function heartBeat0(){diffY=document.body.scrollTop;percent=.1*(diffY-lastScrollY);if(percent>0)percent=Math.ceil(percent);else percent=Math.floor(percent);document.all.searchspe.style.pixelTop+=percent;lastScrollY=lastScrollY+percent;}window.setInterval("heartBeat0()",1);</script>
3.左欄固定廣告
QUOTE:
<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=#2E6287><TD height=20> 推薦↓</TD><TD style='CURSOR: hand' onclick=searchspe.style.visibility='hidden' width=30>關 閉</TD></TR></TABLE>廣告內容</DIV>
4.右欄固定廣告
QUOTE:
<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=#2E6287><TD height=20> 推薦↓</TD><TD style='CURSOR: hand' onclick=searchspe.style.visibility='hidden' width=30>關 閉</TD></TR></TABLE>廣告內容</DIV>
5.漂浮廣告代碼
QUOTE:
<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>
6.固定對聯
QUOTE:
<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=#C54A00><TD height=20> 推薦↓</TD><TD style='CURSOR: hand' onclick=searchspe.style.visibility='hidden' width=30>關 閉</TD></TR></TABLE>
廣告內容</DIV><DIV 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=#12BDFF><TD height=20> 推薦↓</TD><TD style='CURSOR: hand' onclick=searchspe2.style.visibility='hidden' width=30>關 閉</TD></TR></TABLE>
廣告內容</DIV>
7.隨動對聯
QUOTE:
<script language=javascript>function 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=#C54A00><TD height=20> 推薦↓</TD><TD 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(percent>0)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=#12BDFF><TD height=20> 推薦↓</TD><TD 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(percent>0)percent=Math.ceil(percent);else percent=Math.floor(percent);document.all.searchspe2.style.pixelTop+=percent;lastScrollY=lastScrollY+percent;}window.setInterval("heartBeat1()",1);</script>
8.qq好友上線廣告代碼
QUOTE:
<!-- 代碼開始 請將下面的代碼放到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=90><DIV
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>
<!-- 代碼復制結束 -->
㈧ 求網頁特效代碼,飄動的懸浮廣告效果
<SCRIPT language=javascript>
suspendcode="<DIV id=backi style=』left:5px;POSITION:absolute;TOP:185px;』><a href=http://www.da66.com target=blank title=』DA66電腦高手從零起步』><img border=0 src=』http://www.da66.com/images/logo.gif』></a></div>"
document.write(suspendcode);
lastScrollY=0;
function heartBeat(){
diffY=document.body.scrollTop;
percent=.1*(diffY-lastScrollY);
if(percent>0)percent=Math.ceil(percent);
else percent=Math.floor(percent);
document.all.backi.style.pixelTop+=percent;
lastScrollY=lastScrollY+percent;
}
window.setInterval("heartBeat()",1);
</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("document.all." + layerName + ".style.posTop = y"); eval("document.all." + layerName + ".style.posLeft = x"); setTimeout("MoveLeftLayer('AdLayer1');", 20); } function MoveRightLayer(layerName) { var x = 5; var y = 165; 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); } document.write("<div id=AdLayer1 style='position: absolute;visibility:hidden;z-index:1'><a href=連接地址 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() 把上面的代碼另存為一個*.JS文件,然後在想實現此效果的頁面<head></head>之間加上一列代碼: <SCRIPT FOR='EccoolAd' EVENT='fscommand()' LANGUAGE='JavaScript'> AdLayer1.style.visibility='hidden'; AdLayer2.style.visibility='hidden'; </script> <script src=*.js></script> 嘿嘿把分給我吧
㈩ html中怎麼做懸浮廣告啊,在網頁中自由移動的廣告,滑鼠點到它,它就停的那種
這個是必然的,marquee有一塊固定的區域,不會整個頁面飄。要實現你說的效果,必須使用定時器,每次觸發,就把廣告移動一下位置。