Copie o código do código da seguinte forma:
<html>
<head>
<meta http-equiv = "content-type" content = "text/html; charset = gb2312">
<title> Código de publicidade flutuante da Web com um botão fechado </ititure>
</head>
<Body>
<div id = "img" style = "Posição: absoluto; esquerda: 311; topo: 815; visibilidade: Hidden; erval = setInterval ('changepos (), atraso)" align = "direita">
<A href = "#" Target = "_lank"> <img src = "caminho da imagem" online "=" retorna imgzoom (this, 600); Style = "Cursor: Pointer;"/> </a>
<span style = "cursor: Hand; cor: vermelho; peso-fonte: negrito" onclick = "clearInterval (intervalo); img.style.visibility = 'Hidden'"> x </span>
</div>
<idioma do script = javascript src = ff.js>
</script>
</body>
</html>
FF.JS Código
Copie o código do código da seguinte forma:
var xpos = 20;
var ypos = document.body.clitingHeight;
var stage = 1;
var a atraso = 30;
altura var = 0;
var hoffset = 0;
var warfset = 0;
var yon = 0;
var xon = 0;
var pause = true;
intervalo var;
img.style.top = ypos;
função changepos () {{)
largura = document.body.clientWidth;
altura = document.body.clitingHeight;
Hoffset = img.offsetHeight;
Woffset = img.offsetWidth;
img.style.left = xpos + dcument.body.scrollleft;
img.style.top = yPOS + dCument.Body.Scrolltop;
if (yon) {
ypos = yPOS + etapa;
}
outro {
yPOS = yPOS -STEP;
}
if (ypos <0) {
yon = 1;
Ypos = 0;
}
if (ypos> = (altura -Host) {{
yon = 0;
ypos = (altura -Hoffset);
}
if (xon) {
Xpos = xpos + etapa;
}
outro {
Xpos = xpos -STEP;
}
if (xpos <0) {
xon = 1;
Xpos = 0;
}
if (xpos> = (width -woffset) {{
xon = 0;
xpos = (largura -woffset);
}
}
função start () {
img.style.visibility = "visível";
interval = setInterval ('changepos (), atraso);
}
começar ();