|母版title|
--------------------
||
|index|iframe
|menu|内容页
||
-------------------
|母版footer|
-------------------
点击左面菜单/tree,通过设置tree的navi-url,在右面的iframe动态加载内容页面。
iframe要按内容页面自动适应自动调节高度。
母版,菜单比较好解决。
iFrame高度自动调节,好象是个难题耶。
GOOGLE一下,方法一大堆,有点太复杂,都不大行。 vs2008的帮助又动不了,连看个iframe类模型都无办法,菜啊。
试了N回,下面简单代码可以了,asp.net2.0条件下。
<iframeid=\"content\"name=\"content\"scrolling=\"no\"
frameborder=\"0\"width=\"754px\"height=\"50px\"
onload=\"height=this.Document.body.scrollHeight+30;\">
</iframe>
注意事项
1、height设为auto不行的,一定要有一个值
2、this.document引用到是的iframe所在页面对象,
this.Document(大写D),才能引用到iframe内含对象
这个方法可能更稳妥
onload=\"height=document.frames(this.name).document.body.scrollHeight+30\"
3、Opera,firefox,这两LAJI就不考虑啦,日后再说