Current location - Plastic Surgery and Aesthetics Network - Wedding planning company - Ask the space around the website to hang the couplet advertisement code, which can move up and down.
Ask the space around the website to hang the couplet advertisement code, which can move up and down.
Create a JS file in the home directory of your website first, and then create a JS file (such as ad-0 1.js).

Open the text, copy the following code into it and save it in js format.

Function initEcAd() {

document . all . ad layer 1 . style . postop =-200;

document . all . ad layer 1 . style . visibility = ' visible '

document . all . ad layer 2 . style . postop =-200;

document . all . ad layer 2 . style . visibility = ' visible '

MoveLeftLayer(' ad layer 1 ');

MoveRightLayer(“ad layer 2”);

}

Function moveleftlayer (layername) (

var x = 5;

var y = 100; //The height of the left advertisement from the top of the page

var diff =(document . body . scroll top+y-document . all . ad layer 1 . style . postop)* . 40;

var y = document . body . scroll top+y-diff;

eval(" document . all . "+layer name+" . style . postop = parse int(y)");

eval(" document . all . "+layer name+" . style . pos left = x ");

setTimeout(" MoveLeftLayer(' adlayer 1 ');" , 20);

}

Function moverightlayer (layername) (

var x = 5;

var y = 100; //The height of the advertisement at the top right of the page.

var diff =(document . body . scroll top+y-document . all . ad layer 2 . style . postop)* . 40;

var y = document . body . scroll top+y-diff;

eval(" document . all . "+layer name+" . style . postop = y ");

eval(" document . all . "+layer name+" . style . pos right = x ");

setTimeout(" MoveRightLayer(' ad layer 2 ');" , 20);

}

document . write(" & lt; div id = ad layer 1 style = ' position:absolute; Visibility: hidden; z-index: 1 ' & gt; & ltA href='http:// URL you link to' target =' _ blank' > & ltImg src= picture you linked to border =' 0'>& lt/a & gt;; & lt/div >;"

+" & lt; div id = ad layer 2 style = ' position:absolute; Visibility: hidden; z-index: 1 ' & gt; & ltA href='http:// URL you link to' target =' _ blank' > & ltImg src= picture you linked to border =' 0'>& lt/a & gt;; & lt/div >;" );

initEcAd()

// JavaScript document

It's not over yet, and then