weibo_大脸源y_0
2017-08-08 16:49
不太会。有可以帮忙详细讲解的咩????
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]);
}
}
如图所示:
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进阶篇
468060 学习 · 21891 问题
相似问题