11)for in Array
例 3.11.1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title></title>
<script type="text/javascript">
var a=['hello','teacher','马克-to-win'];
for(var iii in a){
this.document.write('inidex'+iii+'的值是'+a[iii]+"<br>");
}
</script>
</head>
<body>
</body>
</html>
更多请见:https://blog.csdn.net/qq_44594249/article/details/100123160
javascript当中for in Array用法
最新推荐文章于 2023-09-27 11:22:37 发布