[英]Validation is not used while my conditions are met.
Here is my code: 这是我的代码:
function getTable(strExp){
this.strExp = strExp;
console.log(strExp);
var strTBL = "";
if (strExp === "Res"){
for (var it = 0; it > 3; it++){
strTBL = strTBL + jsonData.Table.ResTBL[it];
console.log("Im in");
}
}
else if (valeur === "Dice"){
}
return strTBL;
}
In my script I do this call : document.getElementById("ResTBL").innerHTML = getTable("Res") 在我的脚本中,我执行此调用:document.getElementById(“ ResTBL”)。innerHTML = getTable(“ Res”)
When I see my console log I don't see the I'm in log, but it gives me the value of strExp. 当我看到控制台日志时,没有看到我在日志中,但是它为我提供了strExp的值。
Just place it < 3
in a cycle 只需将
it < 3
放置在一个循环中
for (var it = 0; it < 3; it++) {
strTBL = strTBL + jsonData.Table.ResTBL[it];
console.log("Im in");
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.