【发布时间】:2022-11-03 22:41:29
【问题描述】:
我有 2 个字段,我想检查它们的值是否与 "current_outstanding_balance" 相等,如果是,它会将文本添加到字段 "current_outstanding_balance_check" 。当我将一个 var 添加到循环中时,它正在工作。但是我尝试添加更多类似的东西,但它不起作用。
if(overduer && overdue == fieldNameForResult)
这是我的代码:
function(){
var fieldNameForResult = thisPointer.entity.getValue('current_outstanding_balance');
var overduer = thisPointer.entity.getValue('additional_personnel_costs');
var overdue = thisPointer.entity.getValue('overdue');
if(overduer && overdue == fieldNameForResult){
jQ('[id="current_outstanding_balance_check"]').val('True' );
}else{
jQ('[id="current_outstanding_balance_check"]').val('False' );
}
} ```
Now I have no error, but it shows me "False" even though both fields are empty.
【问题讨论】:
标签: javascript jquery