Modern Day Alternative to Frames?

大城市里の小女人 提交于 2019-12-12 21:08:49

问题


What is the current modern alternative to frames?

I want to build the equivilant of a two frame website, with the top frame containing elements that DO NOT RELOAD, the the bottom "frame" being the content frame, which reloads as needed.


回答1:


You can do this with AJAX. You load content dynamically as it's needed. Your content area need not even have size limits - as the user scrolls down the page you can load additional content automatically underneath what was already loaded.




回答2:


You can use server-side languages like PHP and ASP.Net, but if you don't want the header to reload, then AJAX is the way to go.

Using jQuery lib:

$.ajax({
      url: "foo.html",
      context: document.body,
      success: function(){
        alert("Done!");
      }
});



回答3:


You're describing a single page application. See Steve Sanderson's presentation and blog posts - http://blog.stevensanderson.com/2012/03/06/single-page-application-packages-and-samples/

He's using ASP.NET, but the concepts are the same for other server side technologies.



来源:https://stackoverflow.com/questions/9609977/modern-day-alternative-to-frames

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!