【发布时间】:2011-07-31 14:54:18
【问题描述】:
我有一个 iframe,用于显示从 Excel 发布的 HTML 页面。此 iframe 加载包含框架集的文档,该框架集又包含两个框架。底部框架包含一个用于 Excel 文档中工作表的标签条,我想将它放在顶部,而不是用户可以立即看到的地方。
我的包含 iframe:
<iframe name="excel-frame" src="@Url.Content(Model.RelativeHttpPath + "/BettingCards.htm")" width="100%" height="100%"></iframe>
加载到上述 iframe 中的删节 BettingCards.htm 文件:
<html>
<frameset rows="*,39" border=0 width=0 frameborder=no framespacing=0>
<frame src="bettingcards_files/sheet001.htm" name="frSheet">
<frame src="bettingcards_files/tabstrip.htm" name="frTabs" marginwidth=0 marginheight=0>
<noframes>
<body>
<p>This page uses frames, but your browser doesn't support them.</p>
</body>
</noframes>
</frameset>
</html>
如果受够了折磨,我可以通过操作 DOM 和重写 HTML 文件来实现这一点,但我更愿意在页面加载时触发一些 jQuery 代码。
【问题讨论】: