Insertar el fichero b.html dentro del documento a.html
Solución:
a.html:
<html>
<body>
<h1>Put here your HTML content before insertion of b.js.</h1>
...
<script src="b.js"></script>
...
<p>And here whatever content you want afterwards.</p>
</body>
</html>
b.js:document.write('\
\
<h1>Add your HTML code here</h1>\
\
<p>Notice however, that you have to escape LF's with a '\', just like\
demonstrated in this code listing.\
</p>\
\
');
The reason for me against using jQuery is that jQuery.js is ~90kb in size, and I want to keep the amount of data to load as small as possible.
OTRA OPCION
No need for scripts. No need to do any fancy stuff server-side (tho that would probably be a better option)
<iframe src="/path/to/file.html" seamless></iframe>
No hay comentarios:
Publicar un comentario