应该怎样获得那些参数的值啊
只晓得用arguments.length可以知道有多少个,但是没有每个的值啊
<!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>
<script language="javascript">
var gox=1;
var goy=1;
function move()
{
var x = document.getElementById("Layer1").style.left;
var y = document.getElementById("Layer1").style.top;
var speedx = 20;
var speedy = 20;
var w = document.body.offsetWidth;
var h = document.body.offsetHeight;
if(parseInt(x)+150>w || parseInt(x)<0)
gox = -gox;
if(parseInt(y)+100>h || parseInt(y)<0)
goy = -goy;
document.getElementById("Layer1").style.left = x+speedx*gox;
document.getElementById("Layer1").style.top = y+speedy*goy;
setTimeout("move()",800);
}
</script>
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
-->
</style></head>
<body onload="move();">
<div id="Layer1" position:absolute width=150px height=100px z-index=1 left= 0 top= 0> <img src="../t9/上机素材/piaofu.jpg" width="150" height="100" hspace="0" vspace="0" /></div>
</body>
</html>
[此贴子已经被作者于2006-9-5 21:53:49编辑过]