如果具有 id 的 div 具有某些文本,则删除其他 div。
<script language="javascript">
var text = $('#div_with_dynamic_text').text();
var comparingText = 'THE_TEXT'
if(text == comparingText){
$('#OTHER_DIV).css('display','none');
};
</script>
<div id="div_with_dynamic_text">THE_TEXT</div>
<div id="OTHER_DIV"> some other div which needs to hide if certain text</div>