开发者

one TMLH footer page to show all my web page

开发者 https://www.devze.com 2023-01-13 03:39 出处:网络
i am making side all pages sta开发者_开发技巧tic html i want to make footer another page and i want to show all my web page

i am making side all pages sta开发者_开发技巧tic html

i want to make footer another page and i want to show all my web page

because when i have to make change in footer then i will have to change all of my web pages its so difficult i want when i change one page it will appear all pages

how can i do it please help me i am using html pages

Thank's


There is no way to use this using straight HTML - you will need some server side technology - PHP, ASP, Server Side Includes, etc.

Here is a pretty basic break down of some of the options. http://webdesign.about.com/od/ssi/a/aa052002a.htm


Sure no problem. when testing from your hardrive IE will bring the content in, google will not. from a website all browsers will work.

add this to the bottom of your html pages:

<span id="include_footer"></span>

then add a jquery ajax call to get the footer data and replace the span content in the head of html page:

 <script type="text/javascript">
        $(document).ready(function () {
            //include the footer html
            $.ajax({
                url:"footer.html",
                context: document.body, 
                success: function(response){
                    $("#include_footer").html(response);
                },
                error: function(response) {
                    alert('error loading file');
                }
            });

        });
    </script>

Enjoy :)


I see that you're using HTML. Have you considered using PHP? All you need to do is change your page to .php instead of .html and you have a php page. Now, if you make a page, say footer.php, on each of your pages your can add this line:

<?php include 'my/file/path/footer.php'; ?>

Anything that you have in your footer.php file will be included in that page.


Common web servers allows you to prepend or append contents to all pages on particular web app.

For instance in IIS, you can select a an html file for every document you web server returns: it could be found in the IIS website/app properties then in Documents tab.

For Apache Server:

http://perl.guru.org/scott/hobbies/apache/


For purely static HTML, some IDEs can handle this effectively. In Dreamweaver, you can create a template that your site will use. This template can include an editable section and a non-editable section that contains your footer. You then create pages based on this template. When you update the template, Dreamweaver will handle updating all other pages on your site that are based on that template.

Edit: This is an example of a template in Dreamweaver that I made a couple years back for a group project.

The Bobs (Screenshot)

The area surrounded by the blue-green rectangle is the editable region (for pages created based on this template).

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号