Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私のfoo_imageが次のようにコンテナに追加されているとしましょう:
$container.append("<img id='FooImage' src='foo_image.png' />");
別の方法では、このFooImageを、追加されていないかのように削除したいと思います。を使用するだけでこれを達成する方法がわかりませんimg id。うまくいけば、これはderpの質問であり、誰かが簡単な答えを得ることができます!
img id
.remove要素を削除してみてください。
.remove
$('#FooImage').remove();
要素のIDに基づいて検索および削除できます。
$("#FooImage").remove();