Javascript 我如何才能获得选中复选框后的值;更新;模态弹出?
当我打开一个模式进行更新时,我得到了所有的信息。但是,尽管我的复选框值为true,但我无法在屏幕上显示为选中。 documentName和documentCode为文本值,其他为选择选项 我解决了Javascript 我如何才能获得选中复选框后的值;更新;模态弹出?,javascript,jquery,checkbox,bootstrap-modal,Javascript,Jquery,Checkbox,Bootstrap Modal,当我打开一个模式进行更新时,我得到了所有的信息。但是,尽管我的复选框值为true,但我无法在屏幕上显示为选中。 documentName和documentCode为文本值,其他为选择选项 我解决了 if (data.techDocInfoList[0].isSecret == true) { document.getElementById("checkSecretModal").checked = true; } else { document.getE
if (data.techDocInfoList[0].isSecret == true) {
document.getElementById("checkSecretModal").checked = true;
}
else {
document.getElementById("checkSecretModal").checked = false;
}
设置复选框。选中此问题与
c#
无关。我试过了,但不起作用。你建议我具体写在哪里?
if (data.techDocInfoList[0].isSecret == true) {
document.getElementById("checkSecretModal").checked = true;
}
else {
document.getElementById("checkSecretModal").checked = false;
}