Copiar código del código de la siguiente manera:
<html>
<Evista>
<meta http-oquiv = "content-type" content = "text/html; charset = gb2312">
<título> Código de publicidad flotante web con un botón cerrado </title>
</ablo>
<Body>
<div id = "img" style = "Posición: Absolute; Izquierda: 311; arriba: 815; Visibilidad: Hidden; erval = SetInterval ('ChangePos (), Delay)" Align = "Right">
<A href = "#" Target = "_lank"> <img src = "Picture Path" Online "Online =" Devuelve imgZoom (this, 600); Style = "Cursor: Pointer;"/> </a>
<span style = "cursor: hand; color: rojo; font-weight: bold" onClick = "ClearInterval (intervalo); img.style.visibility = 'Hidden'"> x </span>
</div>
<script language = javaScript src = ff.js>
</script>
</body>
</html>
código FF.JS
Copiar código del código de la siguiente manera:
var xPos = 20;
var yPos = document.body.clitingHeight;
paso var = 1;
retraso var = 30;
Var altura = 0;
var hoffset = 0;
var war woffset = 0;
var yon = 0;
var xon = 0;
var pausa = verdadero;
intervalo var;
img.style.top = yPos;
función ChangePos () {{)
ancho = 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 + paso;
}
demás {
YPOS = YPOS -step;
}
if (yPos <0) {
yon = 1;
YPOS = 0;
}
if (yPOS> = (altura -host) {{
yon = 0;
YPOS = (altura -hoffset);
}
if (xon) {
XPOS = XPOS + Paso;
}
demás {
XPOS = XPOS -step;
}
if (xpos <0) {
xon = 1;
XPOS = 0;
}
if (xpos> = (width -woffset) {{
xon = 0;
XPOS = (Width -WoffSet);
}
}
función start () {
img.style.visibility = "Visible";
interval = setInterval ('ChangePos (), demora);
}
comenzar ();