是否可以在重新渲染 div 后使用元素加载?
我的 div:populatedChart 在单击按钮后重新渲染并填充了数据。一旦 div 加载了数据,我想检查特定信息并根据该信息采取行动。我的想法是使用onload函数来做到这一点。但它没有像我预期的那样工作。所以我不确定这是否可能。有人知道吗?
<div class="tableOP" id="populatedChart" onload="populatedChartOnload">
<div class="rowOP headerOP greenOP">
<div class="cell cheaderOP panel-heading green-panel">
This is your Report
</div>
</div>
<div class="rowOP oddOP">
<div class="cellOP companyname paddingStyleCompName" id="blankComp">
{!bvs.Status__c}
</div>
</div>
</div>
function populatedChartOnload(){
if ('{!bvs.Status__c}' != 'Completed') {
document.getElementById("populatedChart").style.display = "none";
}
}