【发布时间】:2010-11-02 03:53:35
【问题描述】:
我的页面中有一个 html 表格、表单和一个隐藏的 iframe。在表格列(td)的 onclick 操作上,我在 iframe 中呈现 pdf 文档。
在 IE 中,这在后续点击时效果很好。但在 Firefox 中,它仅在第一次时有效,在随后的点击中,iframe 不会用最新数据刷新。
这是我的示例代码:
HTML 代码:
<div id="pdfdiv" style="visibility: hidden">
<iframe width="100%" height="100%" scrolling="auto" name="pdfViewer"></iframe>
</div>
使用表单调用 iframe 的 JavaScript 代码:
--
--
pdfdiv.style.visibility = "visible";//also set height and width
--
document.forms1.target="pdfViewer";
document.forms1.action="URL";
document.forms1.submit();
提前感谢您的帮助。
-芒果
【问题讨论】:
标签: javascript html firefox