We will replicate this behavior in the history stack we build.
我们将在自己创建的历史堆栈中再现这种行为。
Creates a history point and adds it to the browser's history stack.
创建一个历史时间点,然后将它添加到浏览器的历史记录堆栈中。
History points are stored in the browser's history stack only as URLs.
记录点在浏览器记录堆叠中仅可以url的方式进行储存。
The history stack object will need to be instantiated and loaded from cache.
需要实例化历史堆栈对象并从缓冲区加载它们。
In the testing application for the history stack, we only stored random Numbers as events.
在针对历史堆栈的测试应用程序中,只存储随机数作为事件。
Our history stack object will only exist as long as the user is on the photo gallery page.
只要用户仍在查看相册页面,历史堆栈对象就会一直存在。
The title of the Web page is used as the title of the state entry in the history stack.
使用网页标题作为历史记录堆栈中状态项的标题。
Our class will copy the entire history stack into a browser cookie every time it changes.
每当发生更改的时候,这个类就会将整个历史记录复制到浏览器cookie中。
We have shown how a custom history stack can be created to track events within an Ajax application.
我们介绍了如何创建一个自定义的历史堆栈来跟踪Ajax应用程序中的事件。
The history stack code should be saved to a.js file, which will be linked into the photo gallery page.
历史堆栈代码被保存到一个.js文件中,该文件将链接到相册页面。
Let's jump right in and talk about the sort of data, or properties, we need to store in our history stack.
我们来看看历史堆栈中需要存储的数据或属性。
We can edit these functions to include calls to our history stack just before making calls to the Sajax functions.
通过编辑这些函数,可以在调用sajax函数之前让该函数先调用历史堆栈。
Rather than building the history stack directly into the photo gallery, we generated a simple page to test our class.
我们没有直接在相册应用程序中建立历史堆栈,而是用一个简单的页面测试这个类。
Running this test page should show us how the history buttons react to the state of the history stack (see Figure 2).
运行该测试页面,可以看到历史记录按钮反映了历史堆栈的状态(见图2)。
If you open the application and click around, you'll see our history stack and pointer stored in the browser's cookies.
打开应用程序并单击链接,就会看到存储在浏览器cookie中的历史堆栈和指针。
Creates a history point and adds it to the browser's history stack, using the specified state key and state value.
使用指定的状态键和状态值创建历史时间点,然后将它添加到浏览器的历史记录堆栈中。
The next three methods we will add to the history stack class are used for getting information from the class (see Listing 3).
给历史堆栈添加的以下三个方法用于从该类中获取信息(参见清单3)。
We're going to pick up directly from where Part 1 left off, adding calls to the history stack directly into the photo gallery page.
我们将从第1部分留下的问题开始,直接从相册页面调用历史堆栈。
Backward, forward, and reload buttons common to Web browsers can be added to our applications to navigate our custom history stack.
可以在应用程序中添加Web浏览器上常见的后退、前进和刷新按钮来导航自定义的历史堆栈。
Creates a history point and adds it to the browser's history stack, using the specified state data collection and state title.
使用指定的状态键、状态值和状态标题创建历史时间点,然后将它添加到浏览器的历史记录堆栈中。
Before we integrate the history stack with the photo gallery application, we will build a simple page to test the functionality.
在把历史堆栈集成到相册应用程序之前,首先要建立一个简单的页面来测试其功能。
Let's first take a look at the addResource method, which will be used to push items onto the end of the history stack (see Listing 2).
首先看一看addresource方法,它用于将记录压入历史堆栈的堆栈顶部(参见清单2)。
The code first instantiates a new history stack object and loads any existing values that may have been saved to the browser's cookies.
这段代码首先实例化一个新的历史堆栈对象,并载入可能已经保存到浏览器cookie中的所有数据。
In building a history stack for the application, we will rely on client-side technologies and integrate directly into the code from Part 1.
在为应用程序建立历史堆栈的过程中,我们将依靠客户端技术,并将其直接与第1部分的代码结合在一起。
When you create a history point, serialized and encrypted data is appended to the URL of the Web page and an entry is included in the browser's history stack.
当您建立记录点时,经过序列化和加密的资料会附加至该网页的URL,而且浏览器的记录堆叠中会加入一个项目。
Android maintains a history stack for every application run from the home page, and you can click the back button to scroll back through this history of activities.
Android维护每个从主页中运行的应用程序的历史堆栈,您可以单击Back按钮回滚这些活动的历史。
Once we have defined the methods for managing arbitrary cookies, we can write two more classes that will handle the specific tasks of reading and writing the history stack.
定义了管理任何cookie的方法之后,可以编写另外两个类专门处理历史堆栈的类。
When adding the backward and forward button handlers, you will also see that this function is called to update the page from the event IDs we have been saving to the history stack.
添加后退和前进按钮处理程序时,还将调用该函数,根据保存到历史堆栈中的事件ID来更新页面。
NET AJAX enables you add entries to a browser's history stack that are linked to a specific state of a Web page, such as the state that is created by an asynchronous postback.
NETAJAX使您可以向浏览器的历史记录堆栈中添加条目,这些条目链接到网页的特定状态,例如通过异步回发创建的状态。
Along with these three properties, the class will have a number of methods for adding elements to the history stack, retrieving items, and saving the stack data to browser cookies.
除了这三个属性外,该类还需要一些方法来添加元素、检索堆栈数据以及将堆栈数据保存到浏览器cookie中。
应用推荐