JSFiddle - React, Tailwind, and code Playground

HTML

<div id="receveur">
                </div>

JavaScript

$.ajax({
    url: "/echo/html/",
    data: {
        html:"<div><scri" + "pt language='javascript' type='text/javascript'>var a = a || 0; a++; function hello() {alert('hi' + a);}<\/scr" + "ipt><h2>This is a title</h2></div>"},
    dataType: "html",
    type: "POST",
    success: function(html) {
        $("#receveur").html(html);
        hello();
    }
});