我有这个html:
<div id="top">
<div id="potato"></div>
</div>
<div id="bottom">
<div id="potato"></div>
</div>
我正在尝试使用 JQuery 来访问底部的土豆 div,但没有任何以下工作。
$('#top #potato').html('Russet');
$('#bottom #potato').html('Red');
$('#top > #potato').html('Russet');
$('#bottom > #potato').html('Red');
$('#potato').html('Idaho');
所有这些只是修改顶部的 div 而不是底部的。如何修改底部的div?