1 代码示例
<script>
var aArray = [1,3,9];
for(var index=0; index < aArray.length; index++){
var oVal = aArray[index];
alert(oVal);
}
var index = 0;
while(index < aArray.length){
var oVal = aArray[index];
alert(oVal);
index++;
}
var index=5;
do{
var oVal = aArray[index];
alert(oVal);
index++;
}while(index < aArray.length);
</script>