Advertising | fluttering | design | Web page Add the following code to var Brok=false;
var Mie=false;
var aver=parseint (navigator.appVersion.substring (0,1));
var aname=navigator.appname;
Check Browser
function Checkbrok ()
{
if (Aname.indexof ("Internet Explorer")!=-1)
{
if (aver>=4)
Brok=navigator.javaenabled ();
Mie=true;
}
if (Aname.indexof ("Netscape")!=-1)
{
if (aver>=4)
Brok=navigator.javaenabled ();
}
}
var vmin=5;
var vmax=2;
var vr=2;
var timer1;
function Chip (chipname,width,height)
{
This.named=chipname;
This.vx=vmin+vmax*math.random ();
This.vy=vmin+vmax*math.random ();
This.w=width;
This.h=height;
this.xx=0;
this.yy=0;
This.timer1=null;
}
function Movechip (chipname)
{
if (Brok)
{
Eval ("chip=" +chipname);
if (!mie)
{
Pagex=window.pagexoffset;
Pagew=window.innerwidth;
Pagey=window.pageyoffset;
Pageh=window.innerheight;
}
Else
{
Pagex=window.document.body.scrollleft;
pagew=window.document.body.offsetwidth-8;
Pagey=window.document.body.scrolltop;
Pageh=window.document.body.offsetheight;
}
CHIP.XX=CHIP.XX+CHIP.VX;
Chip.yy=chip.yy+chip.vy;
Chip.vx+=vr* (Math.random ()-0.5);
Chip.vy+=vr* (Math.random ()-0.5);
if (chip.vx> (vmax+vmin)) chip.vx= (vmax+vmin) *2-CHIP.VX;
if (chip.vx< (-vmax-vmin)) chip.vx= (-vmax-vmin) *2-CHIP.VX;
if (chip.vy> (vmax+vmin)) chip.vy= (vmax+vmin) *2-chip.vy;
if (chip.vy< (-vmax-vmin)) chip.vy= (-vmax-vmin) *2-chip.vy;
if (Chip.xx<=pagex)
{
Chip.xx=pagex;
Chip.vx=vmin+vmax*math.random ();
}
if (CHIP.XX>=PAGEX+PAGEW-CHIP.W)
{
CHIP.XX=PAGEX+PAGEW-CHIP.W;
Chip.vx=-vmin-vmax*math.random ();
}
if (Chip.yy<=pagey)
{
Chip.yy=pagey;
Chip.vy=vmin+vmax*math.random ();
}
if (chip.yy>=pagey+pageh-chip.h)
{
Chip.yy=pagey+pageh-chip.h;
Chip.vy=-vmin-vmax*math.random ();
}
if (!mie)
{
Eval ("document.") +chip.named+ ". Top =" +chip.yy);
Eval ("document.") +chip.named+ ". left=" +chip.xx);
}
Else
{
Eval ("document.all.") +chip.named+ ". style.pixelleft=" +chip.xx);
Eval ("document.all.") +chip.named+ ". Style.pixeltop =" +chip.yy);
}
Chip.timer1=settimeout ("Movechip" ("+chip.named+") ", 100);
}
}
function Stopme (chipname)
{
if (Brok)
{//alert (Chipname)
Eval ("chip=" +chipname);
if (chip.timer1!=null)
{
Cleartimeout (Chip.timer1);
}
}
}
var floater;
Function Floater ()
{
Checkbrok ();
Floater=new Chip ("Floater", 0,0);
if (Brok)
{
Movechip ("floater");
}
}
Add the following code to <body>...</body> between:
<div id=floater style= "height:0px; Position:absolute; width:0px; left:680px; top:150px; Z-index:100 ">
<a href=http://www.webjx.com arget=_blank>
</a>
</div>
Here you can change to your own picture path.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.