惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - 叶小钗
云风的 BLOG
云风的 BLOG
G
Google Developers Blog
S
SegmentFault 最新的问题
罗磊的独立博客
Hugging Face - Blog
Hugging Face - Blog
美团技术团队
爱范儿
爱范儿
博客园 - 三生石上(FineUI控件)
H
Hackread – Cybersecurity News, Data Breaches, AI and More
D
DataBreaches.Net
F
Fortinet All Blogs
TaoSecurity Blog
TaoSecurity Blog
D
Docker
C
Cybersecurity and Infrastructure Security Agency CISA
K
Kaspersky official blog
宝玉的分享
宝玉的分享
腾讯CDC
Google Online Security Blog
Google Online Security Blog
Recorded Future
Recorded Future
T
The Exploit Database - CXSecurity.com
T
The Blog of Author Tim Ferriss
V
V2EX
S
Securelist
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
C
CERT Recently Published Vulnerability Notes
A
Arctic Wolf
Scott Helme
Scott Helme
L
LINUX DO - 热门话题
Y
Y Combinator Blog
P
Proofpoint News Feed
T
Tor Project blog
AWS News Blog
AWS News Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
The Last Watchdog
The Last Watchdog
博客园 - 聂微东
T
Threat Research - Cisco Blogs
B
Blog
Attack and Defense Labs
Attack and Defense Labs
L
Lohrmann on Cybersecurity
C
CXSECURITY Database RSS Feed - CXSecurity.com
阮一峰的网络日志
阮一峰的网络日志
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
IT之家
IT之家
N
News and Events Feed by Topic
博客园 - 司徒正美
H
Help Net Security
C
Cisco Blogs
C
Check Point Blog
S
Secure Thoughts

博客园 - max chan

企业管理软件开发XP 被逼上 Visual Studio 2008 被逼上 visual studio 2005 超级gnFindWindow FLL - C++与VFP 双向混合编程 C++ 松花江上 函数glDefinePopup(),动态定义多级的popup菜单 复习 树-递归 全面自定义 - 代码挂接 设计原则 聪明与代价 VFP程序,全面自定义之表单/类 VFP通用代码(vcx/scx/prg)混淆器,可以下载了 备份策略 死里逃生 先舍后得 VFP -> dot net 过渡 -- foxpro toolkit for dot net VFP与DOT NET之间的过渡 - SEDNA
iframe 高度自动调节,最简单解决
max chan · 2007-12-24 · via 博客园 - max chan

为了公司网站的改版,也为了学ASP.NET,这几天花了N多时间在 vs2005/vs2008/asp.net 上面。

目标:母版页+菜单+iFrame的完美解决 
http://www.yxsoft.net

(还是旧内容,未上传)
--------------------
| 母版 title        |
--------------------
|          |              
|index |  iframe 
|menu |  内容页
|          |              
-------------------
| 母版 footer    |
-------------------

点击左面菜单/tree,通过设置tree的navi-url,在右面的iframe动态加载内容页面。
iframe 要按内容页面 自动适应 自动调节高度 。

母版,菜单 比较好解决。

iFrame高度自动调节,好象是个难题耶。
GOOGLE一下,方法一大堆,有点太复杂,都不大行。
vs2008的帮助又动不了,连看个iframe类模型都无办法,菜啊。

试了N回,下面简单代码可以了,asp.net 2.0条件下。

<iframe id="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就不考虑啦,日后再说