我有一个带有 html 的模态对话框(window.showModalDialog)。当我调整对话框大小时,其中的 HTML 不符合新边界,并且滚动条或元素不会 100% 扩展到新宽度。
为了解决这个问题,我必须将它拖来拖去,然后它会自动将其摇回正确的尺寸。
以编程方式修复它。我执行以下操作window.document.getElementById('removeMainBody').innerHTML =window.document.getElementById('removeMainBody').innerHTML;
但这会导致 html 中的一些动态对象停止运行。
调整对话框大小后,如何解决此问题并使对话框中的元素调整大小?
这是我的代码
else if(<c:out value="${staffCount}" /> > 1){
document.getElementById('removeDiv').style.display = '';
window.dialogWidth='770px';
window.dialogHeight='320px';
window.document.getElementById('removeMainBody').innerHTML =window.document.getElementById('removeMainBody').innerHTML;
}