日期:2014-05-17 浏览次数:20496 次
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>文档阅览</title>
</head>
<body >
<form id="form1" runat="server" style="height:100%; width:100%">
<div style="width:100%; height:100%">
<object classid="clsid:CA8A9780-280D-11CF-A24D-444553540000" id="PDF1" name="PDF1" style="width:100%; height:100%" border="0">
<param name="SRC" value="<%=FilePath %>"/>
</object>
</div>
<script language="JavaScript" type="text/javascript">
[color=#FF0000]alert(document.body.clientHeight);[/color] [color=#339966]//此处获取的高度是192[/color]
document.getElementById("PDF1").height = document.body.clientHeight;
document.getElementById("PDF1").width = document.body.clientWidth;
</script>
</form>
</body>
</html>