Webページの構造は次のようになります:-
<div id='abc'>
<div class='a'>Some contents here </div>
<div class='b'>Some other contents< </div>
</div>
私の目的は、上記の構造のクラス a の後にこれを追加することです。
<div class='a'>Some other contents here </div>
最終的な構造は次のようになります:-
<div id='abc'>
<div class='a'>Some contents here </div>
<div class='a'>Some other contents here </div>
<div class='b'>Some other contents< </div>
</div>
DOM プロパティを使用してこれを行うより良い方法はありますか。コンテンツを解析して更新する単純な方法を考えていました。
疑問を質問する際に不明な点がある場合は、コメントしてください。