简体   繁体   English

满足我的条件时不使用验证。

[英]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.

相关问题 在codeigniter中我的AJAX登录表单总是选择else语句,即使满足条件。 怎么解决这些? - My AJAX login form in codeigniter always chooses the else statement, even if the conditions are met. How to solve these? 满足多个条件时进行Joi验证 - Joi validation when multiple conditions are met While 循环不会停止,即使条件已经满足。 它又持续了 9 次。 没有逻辑意义 - While loop won't stop, even though the condition has been met. It continues for another 9 times. Makes no logical sense 循环JSON并在满足条件时停止。 然后计算物体 - Loop JSON and stop when condition met. Then count the objects 验证动态表单 - 在满足所有条件之前进行 - Validation for dynamic form - progressing before all conditions met 在满足特定条件之前,如何防止网站用户查看特定信息。 - How do I prevent website user from seeing certain information until a certain condition is met. 在满足特定条件后,我试图“启用”禁用的按钮。 遇到麻烦 - I am attempting to 'able' a disabled button after a certain criteria has been met. Having trouble 如果语句条件不满足的Javascript? - Javascript if statement conditions not met? 尝试创建一个 bot 命令,该命令仅在满足确切字数时才继续。 (不和谐机器人 Node.js) - Attempting to create a bot command that only continues if the exact word count is met. (Discord bot Node.js) 如果满足条件,则重新路由用户 - Reroute user if conditions are met
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM