我附上了演示问题的示例代码。我在Firefox 3.5.7中检查这个。问题是父HTML有一个滚动条,并且加载其全屏的iframe(高度:100%,宽度:100%),我想的IFRAME加载后要除去的父滚动条。如何在加载iframe后隐藏父垂直滚动条?
1)这是可能做到? 2)当我们给身高:100%;宽度:100%为什么它只占用视图区域?但不是 完整的父母占领区?
This is Main.html
<Html>
<head>
<script type="text/javascript" src="client.js"></script>
<title>
I am a client
</title>
</head>
<body bgcolor="#000000">
You can see the iframe below...
You can see the iframe below...
You can see the iframe below...<br><br>
<br><br><br><br><br><br>
<br><br><br><br><br><br>
<br><br><br><br><br><br>
<br><br><br><br><br><br>
<br><br><br><br><br><br><br>
<br><br><br><br><br><br>
You can see the iframe below...
<br>
<iframe name="clientframe" id = "clientframe" src = "app.html" style="position:absolute;top:0px;left:0px;width:100%;height:100%;z-index:999;background:#ff0000"
onload = "sendparams();" frameborder="no">
</iframe>
</body>
</html>
This is app.html:
<HTML>
<HEAD>
<title>
I am an Application
</title>
</HEAD>
<BODY>
<h3>This is an application</h3>
<br>
You name <input type="textbox"> <br>
Password <input type="password"><br>
<br>
<br>
<input type="button" value ="Let me in">
</BODY>
</HTML>
注意:打开Main.html,它会加载iframe中的app.html。您可以注意到,在加载iframe后会出现滚动条,并且iframe的红色背景不会完全填充整个父级。
顶我特意把这些BR的,这样滚动条出现在父HTML。当我们说身高:100%,反正我们可以做出100%相对于父母的HTML? – Manohar 2010-02-02 09:18:49