<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<script type="text/javascript" src="Scripts/jquery-1.4.1.min.js"></script>
<head id="Head1" runat="server">
<style type="text/css">
 #Menu
        {
    scrollbar-base-color: #80c14c;
    scrollbar-arrow-color: #335211;
    scrollbar-track-color: #C7E2AD;
    scrollbar-3dlight-color: #60AB0E;
    scrollbar-darkshadow-color: #80c14c;
    scrollbar-face-color: #80c14c;
    scrollbar-shadow-color: #C0DEA4;
overflow-y:scroll;
        }
 </style>
<script type="text/javascript">
$(document).ready(
            function () {
                modefHeight();
            }
        )
        
        function modefHeight() {
            $("#Menu").height($(window).height() - $(".toolbar").height());
        }    </script>
</head>
<body onresize="modefHeight();">
 <form id="form1" runat="server">    <div class="toolbar"></div>
    <div id="Menu">--div内容---<div>
      </form>
<body>
</html>--------------------------------------分割线------------------------------------------
<html><head>
<title></title></head><frameset rows="100,*,25" framespacing="0" border="0" frameborder="0">
  <frame noresize="" target="contents" name="TopMenu" scrolling="no" src="top.aspx">
  <frameset cols="172, *" id="resize">
    <frame noresize="" target="main" name="menu" scrolling="no" src="left.aspx">
    <frame noresize="" name="main" scrolling="yes" src="main.aspx">
  </frameset>
  <frame noresize="" name="status_bar" scrolling="no" src="status_bar.aspx">
</frameset>
</html>
把第一个页面填充到左侧,然后用IE 8打开,左侧会显示一个滚动条,在非兼容模式下改变窗体大小滚动条 高度能自动调节,但是打开兼容模式的时候,改变窗体大小,滚动条高度不能改变

解决方案 »

  1.   

    你在放置frameset的页面添加window.onresize事件就好了,在frameset加载的页面添加resize事件IE7和IE8兼容视图视乎不响应resize事件<html><head>
    <title></title>
    <script type="text/javascript">
        window.onresize = function () {
            document.getElementById('menu').contentWindow.modefHeight();
        }
    </script>
    </head><frameset rows="100,*,25" framespacing="0" border="0" frameborder="0">
      <frame noresize="" target="contents" name="TopMenu" scrolling="no" src="top.aspx">
      <frameset cols="172, *" id="resize">
      <frame noresize="" target="main" id="menu" name="menu" scrolling="no" src="jq.html">
      <frame noresize="" name="main" scrolling="yes" src="main.aspx">
      </frameset>
      <frame noresize="" name="status_bar" scrolling="no" src="status_bar.aspx">
    </frameset>
    </html>