0

我正在使用 ImageFlow 9。我在 Iframe 中添加了一个 ImageFlow 滚动脚本。我想让图像在父页面上的 iframe 之外打开。现在它正在 Iframe 本身中打开图像。我应该在哪个文件中进行哪些更改?

有一个 .js 文件,其功能如下 -

image.onclick = function() { document.location = this.url; }   

我需要在此处或在使用此代码的实际脚本中进行更改吗?

<img src="reflect.php?img=img/large1.jpg" longdesc="javascript:myLightbox.start('img/large1.jpg|Image 1');" alt="Image 1" />
4

1 回答 1

0

在父页面上创建一个 JavaScript 函数,并从 iFrame 调用它。

就像是

function openImage(url){
    // do your image handling stuff here
}

从 iFrame 调用函数:

parent.openImage(url);

ps:我建议根本不要使用iFrame,除非没有其他方法(大多数情况下并非如此)

于 2011-09-28T13:24:49.567 回答