View Single Post
Old 04-27-2011, 12:06 AM   #2
hae2ni7shuo
Second Lieutenant
 
Join Date: Feb 2011
Posts: 366
hae2ni7shuo is on a distinguished road
Default

<SCRIPT>
,北京团购网
<,qq团购!--
// http://qinqing.52blog.net/
var x,上海团购,y
var marginbottom
var marginleft=0
var margintop=0
var marginright
// 速度,团购网,越小越快
var tempo=200
// 单位时间内水平移动的距离
var stepx=10
// 单位时间内上下移动的距离
var stepy=10
var timer
// 图象的路径
img0 = new Image();
img0.src = "http://www.52blog.net/uploadfile/200512205434603.gif";
img1 = new Image();
img1.src = "http://www.52blog.net/uploadfile/20051220534253.gif";
img2 = new Image();
img2.src = "http://www.52blog.net/uploadfile/20051222655179.jpg";
img3 = new Image();
img3.src = "";
// 延迟两秒开始运动
function setValues() {
var firsttimer= setTimeout("setValues2()",上海团购网,2000)
}
function setValues2() {
if (document.all) {
marginbottom = document.body.clientHeight-50
marginright = document.body.clientWidth-50
document.all.ball.style.posLeft=randommaker(margin right-30)+30
document.all.ball.style.posTop=10
moveball()
}
if (document.layers) {
marginbottom = window.innerHeight-10
marginright = window.innerWidth-10
document.ball.left=randommaker(marginright-30)+30
document.ball.top=10
moveball()
}
}
function randommaker(range) {
rand=Math.floor(range*Math.random())
return rand
}
function moveball() {
checkposition()
chooseimage()
if (document.all) {
document.all.ball.style.posLeft+=stepx
document.all.ball.style.posTop+=stepy
timer=setTimeout("moveball()",tempo)
}
if (document.layers) {
document.ball.left+=stepx
document.ball.top+=stepy
timer=setTimeout("moveball()",团购网站大全,tempo)
}
}
function checkposition() {
if (document.all) {
if (document.all.ball.style.posLeft>=marginright) {
stepx=stepx*-1
document.all.ball.style.posLeft-=10
}
if (document.all.ball.style.posLeft<=marginleft) {
stepx=stepx*-1
document.all.ball.style.posLeft+=10
}
if (document.all.ball.style.posTop>=marginbottom) {
stepy=stepy*-1
document.all.ball.style.posTop-=10
}
if (document.all.ball.style.posTop<=margintop) {
stepy=stepy*-1
document.all.ball.style.posTop+=10
}
}
if (document.layers) {
if (document.ball.left>=marginright) {
stepx=stepx*-1
document.ball.left-=10
}
if (document.ball.left<=marginleft) {
stepx=stepx*-1
document.ball.left+=10
}
if (document.ball.top>=marginbottom) {
stepy=stepy*-1
document.ball.top-=10
}
if (document.ball.top<=margintop) {
stepy=stepy*-1
document.ball.top+=10
}
}
}
function chooseimage() {
if (document.all) {
if (stepx <= 0 && stepy <=0) {ballimage.src="http://www.52blog.net/uploadfile/200512205434603.gif"}
if (stepx >= 0 && stepy <=0) {ballimage.src="http://www.52blog.net/uploadfile/20051220534253.gif"}
if (stepx <= 0 && stepy >=0) {ballimage.src="http://www.52blog.net/uploadfile/20051222655179.jpg"}
if (stepx >= 0 && stepy >=0) {ballimage.src=""}
}

if (document.layers) {
if (stepx <= 0 && stepy <=0) {document.ball.document.ballimage.src="http://www.52blog.net/uploadfile/200512205434603.gif"}
if (stepx >= 0 && stepy <=0) {document.ball.document.ballimage.src="http://www.52blog.net/uploadfile/20051220534253.gif"}
if (stepx <= 0 && stepy >=0) {document.ball.document.ballimage.src="http://www.52blog.net/uploadfile/20051222655179.jpg"}
if (stepx >= 0 && stepy >=0) {document.ball.document.ballimage.src=""}
}
}

// -->
</SCRIPT>
<META content="Microsoft FrontPage 4.0" name=GENERATOR></HEAD>
<BODY bgColor=#ffffff onload=setValues()>
<DIV id=ball style="POSITION: absolute; TOP: -50px"><IMG border=0 name=ballimage src="http://www.52blog.net/uploadfile/200512205434603.gif"></DIV></BODY></HTML>
hae2ni7shuo is offline   Reply With Quote

Sponsored Links