我的目标是在Index页面中包含HTML按钮,以便将我的MRTG页面分类到不同的子类别中。现在,我所做的就是用我自己创建的.png生成6个空图,它工作得很好。唯一的问题是,现在我想要添加更多的页面,我希望有更小的按钮,因为我使用3列,它们的大小与图形相同。
我也尝试过修改index.html文件,但是每次我想要添加一个图表时,我必须运行索引制造者,所以我运行:
/usr/bin/indexmaker --output=/var/www/mrtg/index.html --title='MRTG Test'
--columns=3 /etc/mrtg/cfg/mrtg.cfg有人知道怎么做吗?
非常感谢。
发布于 2016-08-23 15:46:25
我终于找到了怎么做。我只需创建一个HTML页面,在顶部放置一个悬停下拉菜单(当用户将鼠标移动到元素上时出现的下拉菜单),然后使用iframe,我将包含index.html MRTG页面。
下面是如何创建悬停下拉菜单:
http://www.w3schools.com/howto/howto_css_dropdown.asp
为了在iframe中包含index.html页面:
<div>
<iframe id="form-iframe" src="index.html" style="margin:0; width:100%; height:150px; border:none; overflow:hidden;" scrolling="no" frameborder="0" onload="AdjustIframeHeightOnLoad()">
</iframe>
<script type="text/javascript">
function AdjustIframeHeightOnLoad() { document.getElementById("form-iframe").style.height = document.getElementById("form-iframe").contentWindow.document.body.scrollHeight + "px"; }
function AdjustIframeHeight(i) { document.getElementById("form-iframe").style.height = parseInt(i) + "px"; }
</script>
</div>javascript部分用于根据页面大小自动调整内容。
https://serverfault.com/questions/797165
复制相似问题