qq_沙冷_0
2016-04-19 14:26
<html >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>数组</title>
<script type="text/javascript">
var myd=new Array['*','**','***','****'];
alert(myd.length);
for(var i=0;i<myd.length;i++){
document.write(myd[i]+"<br/>");
}
</script>
</head>
<body>
</body>
</html>
new Array('*','**','***','****')
var myd=new Array['*','**','***','****'];改成var myd=new Array('*','**','***','****');或var myd=['*','**','***','****'];
JavaScript进阶篇
468061 学习 · 21891 问题
相似问题