Embed HTML files in other HTML pages

I am new to HTML. I have an html page called " main.html" and I want to include another html page called " menu.html" in it. My page main.htmldoes not include frames and is intended for use with tags div. My site is hosted on a Linux based server. The site I have to redesign is Java issues .

+3
source share
5 answers

You want to see the server side (SSI). This Apache tutorial should launch you and run if this site is running on Apache.

There are many ways to interact with the server, but all but SSI require a language other than HTML.

If you are using IIS, you can check Microsoft Record Server-Side Includes .

+9
source

Pay attention to the server side.

+1
source

. .. jsp : <c:import url="/include/navigation.jsp" />, php <?php include("/sidebar.php");?> . , : , , . ( javascript, ), , Java Questions - .

+1

, PHP - . main.html main.php, php-, , :

<?php include('menu.html'); ?>

! , php . . , - Dreamweaver ( ), , .

+1

ajax- javascript, .

JQuery :

<div id="putStuffHere">


</div>
<script>
$('#putStuffHere').load('myStuff.html');
</script>
-1

Source: https://habr.com/ru/post/1705103/


All Articles