Jquery如何使用历史插件? [英] Jquery How to use history plugin?
问题描述
在我的Web应用程序中,我使用的是ajax,现在我希望后退和前进的浏览器按钮能够正常工作。所以我去寻找一个jquery历史插件并找到了这个: http://stilbuero.de/jquery/history
In my web application I am using ajax and now I'd like the back and forward browser buttons to work. So I went looking for a jquery history plugin and found this one: http://stilbuero.de/jquery/history
在我的代码中,我使用一个函数来加载页面:
In my code I use a function to load a page:
function loadDocument(id, doc) {
$("#DocumentContent").show();
// Clear dynamic menu items
$("#DynamicMenuContent").html("");
$("#PageContent").html("");
// Load document in frame
$("#iframeDocument").attr("src", 'ViewDoc.aspx?id=' + id + '&doc=' + doc + '');
// Load menu items
$("#DynamicMenuContent").load("ShowButtons.aspx");
}
正如您所见,我希望我的网页可以在iframe中加载。有人能告诉我如何使用历史插件,以便brwoser按钮可以工作吗?只要浏览器按钮工作,我真的不关心它是哪个插件。我更喜欢一个易于使用的插件。
As you can see I want my pages to load within an Iframe. Can someone tell me how I can use a history plugin so that the brwoser buttons will work? I don't really care which plugin it is, as long as the browser buttons work. I prefer an easy to use plugin.
推荐答案
由于我使用的是iframe,后退和前进按钮仍在工作!我的印象是,这不起作用,因为我使用ajax,但它确实有效!
Since I am using an Iframe, the back and forward buttons are still working! I was under the impression that this wouldn't work because I use ajax, but it does work!
这篇关于Jquery如何使用历史插件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!