HTML içerisinde başka bir html i içeriye alma

index.html

<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>

    <script src="//code.jquery.com/jquery-2.1.3.min.js"></script>
    <script type="text/javascript">
        $(function () {
            $("#header").load("header.html");
            $("#footer").load("footer.html");
        });
    </script>
</head>
<body>

<div>
    <div id="header"></div>

    <div>
        my content
    </div>

    <div id="footer"></div>
</div>

</body>
</html>

header.html

<div>
    header
</div>

footer.html

<footer>
    <div>footer</div>
</footer>
Share on Facebook0Tweet about this on TwitterShare on Google+0Share on StumbleUpon0Share on Reddit0

Leave a Reply


*