跳到内容

水妖视界 日志

群里一网友搞笑求职

因经济困难,本人现欲想做兼职,有意者来电来函咨询,本人承接以下业务:苦力搬运,装卸,车工,钳工,焊工,水电工,瓦工,砸墙,砌墙,筛沙,油漆,通下水道,贴瓷砖,拆洗油烟机,拆装空调,Vb,C++,.NET,C#,Java,j2ee, j2me,asp,delphi,php,汇编,PC&手机游戏开发,网络维护管理,三维建模,照片上色,平面设计,建筑效果图,flash动画,硬件设计,电路板设计,单片机开发, 四六级替考,办证,代·开·发·嘌

网页两旁滑动广告

新建一js文件,内容如下
var delta=0.015;
var collection;
var closeB=false;
function floaters() {
this.items = [];
this.addItem = function(id,x,y,content)
{
document.write(‘
<div id=”‘+id+'” style=”z-index: 10; position: absolute; width: 80px; height: 60px; left: ‘+(typeof(x)==’string’?eval(x):x)+’; top: ‘+(typeof(y)==’string’?eval(y):y)+’;”>’+content+'</div>
‘);
var newItem = {};
newItem.object = document.getElementById(id);
newItem.x = x;
newItem.y = y;
this.items[this.items.length] = newItem;
}
this.play = function()
{
collection = this.items
setInterval(‘play()’,30);
}
}
function play()
{
if(screen.width {
for(var i=0;i
{
collection[i].object.style.display = ‘none’;
}
return;
}
for(var i=0;i {
var followObj = collection[i].object;
var followObj_x = (typeof(collection[i].x)==’string’?eval(collection[i].x):collection[i].x);
var followObj_y = (typeof(collection[i].y)==’string’?eval(collection[i].y):collection[i].y);
if(followObj.offsetLeft!=(document.body.scrollLeft+followObj_x)) {
var dx=(document.body.scrollLeft+followObj_x-followObj.offsetLeft)*delta;
dx=(dx&gt;0?1:-1)*Math.ceil(Math.abs(dx));
followObj.style.left=followObj.offsetLeft+dx;
}
if(followObj.offsetTop!=(document.body.scrollTop+followObj_y)) {
var dy=(document.body.scrollTop+followObj_y-followObj.offsetTop)*delta;
dy=(dy&gt;0?1:-1)*Math.ceil(Math.abs(dy));
followObj.style.top=followObj.offsetTop+dy;
}
followObj.style.display = ”;
}
}
function closeBanner()
{
closeB=true;
return;
}
var theFloaters = new floaters();
//
theFloaters.addItem(‘followDiv1′,’document.body.clientWidth-100′,0,'<a onclick=”closeBanner();” href=”http://www.shuiyao.net” target=”_blank”><img src=”images/ok1.gif” alt=”” width=”100″ height=”400″ border=”0″ /></a>

<img onclick=”closeBanner();” src=”images/close.gif” alt=”” />’);
theFloaters.addItem(‘followDiv2′,0,0,'<a onclick=”closeBanner();” href=”http://www.shuiyao.net” target=”_blank”><img src=”images/ok1.gif” alt=”” width=”100″ height=”400″ border=”0″ /></a>

<img onclick=”closeBanner();” src=”images/close.gif” alt=”” />’);
theFloaters.play();
然后在所需页面中调用此js文件