My solution is similar to the one of lolo above. However, I insert the HTML code via JavaScript’s document.write instead of using jQuery:


<h1>Put your HTML content before insertion of b.js.</h1>

<script src=«b.js»></script>

<p>And whatever content you want afterwards.</p>

Alternatively for browsers that support template literals the following also works:



<h1>Add your HTML code here</h1>

<p>Notice, you do not have to escape LF’s with a »,
like demonstrated in the above code listing.



Continua leyendo «Insertar Html dentro de otro HTML»

Entradas relacionadas

Deja una respuesta

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *