JSFiddle - React, Tailwind, and code Playground

HTML

<div class="replace">
<div>
    <table>
        <tr>
            <td>hello</td>
        </tr>
    </table>   
</div>
</div> 

<div class="result" / >

JavaScript

$(".result").html($(".replace").html())
 alert($(".result").html())