如题!希望各位告诉告诉我一哈!
这么没的人啊!?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style>
#imgdiv {
position:absolute;
width:100px;
height:120px;
top:400px;
left:390px;
visibility:collapse;
}
#showDiv {
position:absolute;
width:300px;
height:250px;
top:100px;
left:100px;
visibility:collapse;
background:#FF00FF;
}
body {
background-image: url(images/ff.gif);
}
</style>
</head>
<script language="javascript1.1" type="text/javascript">
<!--
var x
var xe ,xs ,h
var k
var speed ,t
var x_dl
var flag ,r ,startFlag = 1
var imgWB
var imgSrc = new Array(2)
imgSrc[0] = "images/ju.gif"
imgSrc[1] = "images/bs.gif"
function Init()
{
x = 100
xe = 100 ,xs = 390 ,h = 400
k = 2
speed = 0.2 ,t = 0
x_dl = 1
flag = 0 ,r ,startFlag = 1
imgWB = 50
}
function Turn()
{
if(h > 150|| x < 100 || flag)
{
startFlag = 0
setTimeout("Turn()",10)
r = (t+x_dl)*speed
if(r > 1.57 || r < -1.57)
{
x_dl = -x_dl
if(flag)
flag = 0
else
flag = 1
img.src = imgSrc[flag]
}
t += x_dl
x = Math.cos(t*speed)*100
h -= k
img.width = x
imgdiv.style.left = xs-imgWB-x/2+(xe-xs)*(300-h)/300+"px"
imgdiv.style.top = h
imgdiv.style.width = x+"px"
}
else
{
startFlag = 1
}
}
function Return()
{
}
//-->
</script>
<body onload="Init()">
<div id="showDiv">
</div>
<div id="imgdiv">
<img src="images/ju.gif" width="100" height="120" id="img" onmouseover="if(startFlag)Turn()" />
</div>
<div style="background-color:black; width:300px; height:300px; border:2px outset buttonface; margin:30px; filter:alpha(opacity=50); opacity:0.5;">
<img src="images/campus4.gif" id="img2"/></div>
</body>
</html>
新作的
比较槽