简体   繁体   English

如何获得在“更新”模式弹出窗口中选中复选框的值?

[英]How can I get the value that comes true with the checkbox checked in the "update" modal popup?

When I open a modal to update, I get all the information.当我打开要更新的模式时,我会得到所有信息。 But although my checkbox value is true, I cannot display it as checked on the screen.但是,尽管我的复选框值为 true,但我无法在屏幕上将其显示为选中状态。 documentName and documentCode is text value, others are select option. documentName 和 documentCode 是文本值,其他是 select 选项。

在此处输入图像描述

$('#selectedAddDocName').val(data.techDocInfoList[0].technicalDocumentTypeId).trigger('change');
$('#selectedAddTeknikResim').val(data.techDocInfoList[0].technicalDocumentSubTypeId).trigger('change');
$('#selectedStokGrubu').val(data.techDocInfoList[0].technicalDocumentStockGroupId).trigger('change');

document.getElementById('dokumanKoduInputModal').value = data.techDocInfoList[0].documentCode;
document.getElementById('dokumanAdiInputModal').value = data.techDocInfoList[0].documentName;

I solved.我解决了。

 if (data.techDocInfoList[0].isSecret == true) {
 document.getElementById("checkSecretModal").checked = true;
    }
 else {
   document.getElementById("checkSecretModal").checked = false;
   }

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 我想设置复选框以检查值是否为真 - I want to set checkbox to checked if the value comes true 如何获取复选框检查值并在检查值为true时运行代码 - How to get checkbox checked value and run code on if checked value is true 如果选中复选框,如何才能更新文本框? - How can I get a textbox to update when a checkbox is checked? 如何在 javascript/jquery 中获得选中的复选框标题值? - How can i get a checked Checkbox title value in javascript/jquery? 如果选中复选框,我如何从复选框中获取属性值? - How can i get attribute value from a checkbox if it's checked? 如何在输入文本框中获取值复选框模式弹出 ajax - How to get value checkbox modal popup ajax on input textbox 当复选框被选中或复选框未选中删除值时,如何在另一个文本框中获得复选框值和文本框值的总和 - how can i get sum of checkbox value and textbox value in another textbox when checkbox is checked or if checkbox unchecked remove the value 如果布尔值是true,如何检查复选框? - How to checked checkbox if boolean value is true? 如何获取已选中(复选框)的值并在本机反应中自动完成 textInput - How can I get the value of checked (checkbox) and autocomplete a textInput in react native 如何获得复选框的最新检查值? - How do i get the latest checked value of the checkbox?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM