简体   繁体   English

页面上的Ajax加载

[英]Ajax load on a page

So, I really like Google play store on web browser. 因此,我非常喜欢Google浏览器在网络浏览器上的存储。

I am trying to make the similar web behavior. 我正在尝试进行类似的网络行为。

For example, when you choose a category or item, the menu and overall "frame" of the site does not change (ie. not refreshed) and only the main content changes and a "loading" icon before the content changes. 例如,当您选择类别或项目时,站点的菜单和整体“框架”不会更改(即未刷新),并且仅主要内容会更改,而内容之前的“正在加载”图标也会更改。

How can I achieve something like that? 我该如何实现这样的目标? is it javascript? 是javascript吗?

Thanks! 谢谢!

Use AJAX, Here are some very good tutorials to get you started. 使用AJAX,这是一些很好的入门指南。

use jQuery to make it very easy and cross-browser supported 使用jQuery使其变得非常容易并支持跨浏览器

http://tutorialzine.com/2009/09/simple-ajax-website-jquery/ http://tutorialzine.com/2009/09/simple-ajax-website-jquery/

http://www.smashingmagazine.com/2008/10/16/50-excellent-ajax-tutorials/ http://www.smashingmagazine.com/2008/10/16/50-excellent-ajax-tutorials/

http://www.queness.com/post/328/a-simple-ajax-driven-website-with-jqueryphp http://www.queness.com/post/328/a-simple-ajax-driven-website-with-jqueryphp

Ajax short for asynchronous JavaScript and XML) is a group of interrelated Web development techniques used on the client-side to create asynchronous Web applications. Ajax是异步JavaScript和XML的缩写)是一组相互关联的Web开发技术,在客户端上用于创建异步Web应用程序。

Steve, Please refer to the fiddle for simple jQuery.load use: jQuery Load 史蒂夫,请参阅小提琴以了解简单的jQuery.load使用: jQuery Load

$(selector).load('link')

Cheers! 干杯!

Yes this can be achieved by JavaScript/jQuery, css and html. 是的,这可以通过JavaScript / jQuery,css和html来实现。 One can use ajax to get data from server and manipulate the data at client side to display it in any part of the page. 可以使用ajax从服务器获取数据,并在客户端操作数据以将其显示在页面的任何部分。 Here are the links you can refer to: 您可以参考以下链接:

With plain JavaScript: plain JavaScript 使用纯JavaScript: 纯JavaScript

With jQuery: jQuery 使用jQuery: jQuery

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM