网站漂浮广告代码肿么写
的有关信息介绍如下:
script type=text/javascript
function hidead()
{document.getElementById(ad).style.display=none;}
/script
div id=ad style=position:absolute
!--放广告代码--DIV onClick=hidead(); style=FONT-SIZE: 9pt; CURSOR: hand align=right关闭广告×/DIV/div
script
var x = 80,y = 80
var xin = true, yin = true
var step = 1
var delay = 1
var obj=document.getElementById(ad)
function floatAD() {
var L=T=0
var R= document.body.clientWidth-obj.offsetWidth
var B = document.body.clientHeight-obj.offsetHeight
obj.style.left = x + document.body.scrollLeft
obj.style.top = y + document.body.scrollTop
x = 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(floatAD(), delay)
obj.onmouseover=function(){clearInterval(itl)}
obj.onmouseout=function(){itl=setInterval(floatAD(), delay)}
/script
做个锚链就好了
请问,您是不是在用 斐讯K2 的路由器?
貌似是这款路由器在搞鬼。
我这有几个,你要不
htmlheadmeta http-equiv=Content-Type content=text/html; charset=gb2312 /title漂浮广告2/title/headbodyDIV onmouseover=stop() onmouseout=nostop() id=img1 style=Z-INDEX: 100; LEFT: 2px; WIDTH: 59px; POSITION: absolute; TOP: 43px; HEIGHT: 61px; visibility: visible;a target=_blank href=/ title=详情点击进入img src=/ad/js03/Images/caiyu.gif width=80 height=31 border=0/a/DIVSCRIPTvar xPos = 1200;var yPos = 500; var step = 1;var delay = 10; var height = 0;var Hoffset = 0;var Woffset = 0;var yon = 0;var xon = 0;var pause = false;var interval;img1.style.top = yPos;function changePos() {if(!pause){ width = document.body.clientWidth; height = document.body.clientHeight; Hoffset = img1.offsetHeight; Woffset = img1.offsetWidth; img1.style.left = xPos + document.body.scrollLeft; img1.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() { img1.visibility = visible; interval = setInterval('changePos()', delay); } function pause_resume() { if(pause) { clearInterval(interval); pause = false;} else { interval = setInterval('changePos()',delay); pause = true; } } function stop(){ pause=true; } function nostop(){ pause=false; } start(); /SCRIPT/body/html我自己测了,应该没问题~
http://blog.chinaunix.net/uid-24427209-id-2608398.html
这篇博文上面有详细的介绍 楼主按照他的方法一步步来就行
就是,做个锚链接就行了



