<!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=utf-8" />
<title>什么是数组</title>
<script type="text/javascript">
var myarr=new Array(); //定义数组
myArr[0]=80;
myArr[1]=60;
myArr[2]=99;
for(i=0;i<myarr.length;i++){
document.write("第"+(i+1)+"个人的成绩是"+myarr[i]);
}
</script>
</head>
<body>
</html>
区分大小写!
a[0]="一"
a[1]="二"
a[2]="三"
for(i=0,b=0;i,b<myarr.length;i++,b++){
document.write("第"+a[b]+"个人的成绩是"+myarr[i]+"<br/>");
}
这句怎么实现不了?
原来是我的myarr写错了,已经解决