How can we change only inner part of a web page?

前端 未结 7 1093
说谎
说谎 2020-12-06 08:25

I am developing a web application, where headers and footers for all pages are the same. What I want to achieve, is to change only the part of the page between the header an

7条回答
  •  独厮守ぢ
    2020-12-06 09:05

    I agree with rlemon. I think jQuery/AJAX is what you are looking for. For example:

    
        
            
            
        
        
            
            

    In this simple implementation, I have just created 2 simple HTML pages, index.html will be used as a template. And activities.html, which contains the content I want to load dynamically.

    Therefore, if I click Activities, it should load activities.html into without reloading the entire page.

    You can download the jquery library from jquery.org

    I haven't tested this, but it should work.

    Hope it helps :-)

提交回复
热议问题