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