4-10编程题

来源:4-10 编程练习

weibo_大脸源y_0

2017-08-08 16:49

59897ae20001e07f05400960.jpg
不太会。有可以帮忙详细讲解的咩????

写回答 关注

3回答

  • 政政0213
    2017-08-08 17:07:13
    已采纳


      var infos=[["小A","女",21,"大一"],["小B","男",23,"大三"],["小C","男",24,"大四"],["小D","女",21,"大一"],["小E","女",22,"大四"],["小F","男",21,"大一"],["小G","女",22,"大二"],["小H","女",20,"大三"],["小I","女",20,"大一"],["小J","男",20,"大三"]];

     for(var i=0;i<=9;i++){

     if(mu[i][3]=="大一"){

       if(mu[i][1]=="女")

     document.write(mu[i][0]);

     }

     }


  • 超级无敌可爱的美少女
    2017-08-08 17:24:51

    如图所示:

    http://img.mukewang.com/5989833d0001a43307210671.jpg

    weibo_...

    是不是应该是 i<infos.length? 不要=啊??

    2017-08-08 20:16:08

    共 1 条回复 >

  • 慕仰5493783
    2017-08-08 17:16:08

    var inter = [['小A','女',21,'大一'],['小B','男',23,'大三'],['小C','男',24,'大四'],['小D','女',21,'大一'],['小E','女',22,'大四'],['小F','男',21,'大一'],['小G','女',22,'大二'],['小H','女',20,'大三'],['小I','女',20,'大一'],['小J','男',20,'大三']];
    for(var i=0;i<inter.length;i++){
        if(inter[i][1]=='男'||inter[i][3]!=='大一'){
            continue;
        }
        document.write(inter[i][0]+'<br/>');
    }

JavaScript进阶篇

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

468060 学习 · 21891 问题

查看课程

相似问题