我曾尝试下面的代码。但它没有正确显示iframe。 Iframe的高度和宽度非常小。 Iframe应该根据页面大小获取高度和宽度。设置I帧的宽度和高度为100%按页面大小不工作
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<style type="text/css">
#left {
float: left;
}
#right {
float: left;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div >
<div id="left">
<asp:Button runat="server" ID="b1" OnClick="b1_Click" Text="Click" />
</div>
<div id="right">
<iframe id="ifr1" runat="server" style="width: 100%; height: 100%" />
</div>
</div>
</form>
</body>
</html>
你需要对你的html和body标签100%高度也或对IFRAME – Pete
我的身体和div标签的高度和宽度设置为100%的父标签中的一个设定高度。它仍然没有以正确的方式显示出来。 – user2323308
有多大你想要的iframe - 如果你给特定维度以'#right'那么你的iframe会占用宽度和高度。 – Pete