zoukankan      html  css  js  c++  java
  • RSH(Really Simple History)记录ajax的浏览历史

    官方网站

    http://code.google.com/p/reallysimplehistory/

    主要涉及到两个对象的使用。

    dhtmlHistory和historyStorage。

    1. dhtmlHistory.add(param1, param2)。

    这个方法是存储浏览器历史记录,比如现在的url是http://test.com/test.html#p1,如果点击页面中的某个地方进行ajax更新,url变为http://test.com/test.html#p2,则调用方法dhtmlHistory.add("p2", param2)。这里框架会自动记录下以前的浏览记录http://test.com/test.html#p1,并且会自动把url变为http://test.com/test.html#p2,这个“#p2”是不用自己去通过改的。框架允许在这个过程中存储一些数据,根据应用来决定是否需要存储数据,如果有,可以存储在param2中。

    2. 如果用户点击浏览器前进或者回退按钮,会自动调用开发者注册的一个回调函数。

    回调函数的注册方法是

    dhtmlHistory

  • 相关阅读:
    索引压缩
    拼写校正
    词典(词汇表)
    Text Relatives II
    Text Relatives
    CoreText
    Quartz2D Text
    PDF Document Creation, Viewing
    Core Graphics Layer Drawing
    Bitmap Images and Image Masks
  • 原文地址:https://www.cnblogs.com/shaojun/p/1940616.html
Copyright © 2011-2022 走看看