empty

来源:3-8 编程练习

qq_慕勒8168853

2021-08-06 13:29

length是8? empty哪儿来的啊

写回答 关注

1回答

  • 慕移动8825332
    2021-08-06 19:52:20

    <!DOCTYPE  HTML>

    <html >

    <head>

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

    <title>数组</title>

    <script type="text/javascript">

     //创建数组

        var  arr = ['*','##',"***","&&","****","##*"];


       arr[7] = "**";

     //显示数组长度

    // alert(arr.length);

     

     //将数组内容输出,完成达到的效果。

    document.write(arr[0]+'<br/>');


    document.write(arr[7]+'<br/>');


    document.write(arr[2]+'<br/>');


    document.write(arr[4]+'<br/>');



    </script>

    </head>

    <body>

    </body>

    </html>


JavaScript进阶篇

本课程从如何插入JS代码开始,带您进入网页动态交互世界

469390 学习 · 22585 问题

查看课程