1

使用 Highslide 我想在使用 close X 关闭 ajax 窗口时刷新父页面。我已经在页面上有一个按钮可以执行此操作,但不能保证用户会使用该按钮。我已经尝试了几个我发现的例子,但似乎没有一个有效。

hs.Expander.prototype.onAfterClose = function() {
parent.window.location.reload();
}

hs.Expander.prototype.onAfterClose = function() {
if (this.a.id == 'tag-send-form') parent.window.location.reload();
}

任何帮助,将不胜感激。

4

1 回答 1

4

将其放在 Highslide Javascript 文件之后的脚本块中(或在您的 highslide.config.js 文件中):

hs.Expander.prototype.onAfterClose = function() {
    window.location.reload();
};

注意:此代码需要 highslide-full.js

于 2013-04-02T13:59:50.073 回答