页面Default.aspx里面包含三个iframe
<body>
<form id="form1" runat="server">
<div>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td>
<iframe runat="server" id="TopIframe" height="115" src="Top.aspx" scrolling="no" width="774" frameborder="0"></iframe>
</td>
</tr>
<tr>
<td>
<iframe runat="server" id="MiddleIframe" src="Middle.aspx" scrolling="no" width="774" frameborder="0"></iframe>
</td>
</tr>
<tr>
<td>
<iframe id="BottomIframe" src="Bottom.aspx" width="100%" scrolling="no" frameborder="0"></iframe>
</td>
</tr>
</table>
</div>
</form>
</body>
页面Middle.aspx里面又包含有frameset,外面一个frameset是用来做自动高度的,里面一个是真正包含内容的
<noframes>您的浏览器不支持框架</noframes>
<frameset id="LayoutFrameset" rows="0,*" frameborder="0" framespacing="0">
<frame id="LayoutTop" src="#" noresize="noresize" />
<frameset id="pMainFrameset" frameborder="0" framespacing="0" cols="158,616">
<frame id="pleft" name="pleft" scrolling="no" noresize="noresize" src="Left.aspx?wNO=<%=WebNO()%>" />
<frame id="pmain" name="pmain" scrolling="no" noresize="noresize" src="Main.aspx?wNO=<%=WebNO()%>" allowtransparency="true" runat="server" />
</frameset>
</frameset>
在Main.aspx页面我已经搞定了高度的自动变化
<script type="text/javascript">
window.onload=function()
{
if(window.document.body.scrollHeight<680)
{
window.parent.document.all("LayoutFrameset").rows="0,680";
window.parent.parent.document.all('MiddleIframe').height=680;
}
else
{
window.parent.document.all("LayoutFrameset").rows="0,"+window.document.body.scrollHeight;
window.parent.parent.document.all('MiddleIframe').height=window.document.body.scrollHeight;
}
}
</script>
我的问题是:在Default.aspx页里面在iframe外面才可以使用滚轮控制滚动条,而鼠标移动到iframe里面的frameset里面的无论是left.aspx或者Main.aspx页的时候,不管怎么滚动滚轮,滚动条都不动,让人非常难过,一定要把鼠标移动到iframe(frameset)外面来才起作用,感觉很不爽。是否有个方法可以设置一个所谓的全局鼠标或者叫全局滚动来解决这一问题。请高人指点。
<body>
<form id="form1" runat="server">
<div>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td>
<iframe runat="server" id="TopIframe" height="115" src="Top.aspx" scrolling="no" width="774" frameborder="0"></iframe>
</td>
</tr>
<tr>
<td>
<iframe runat="server" id="MiddleIframe" src="Middle.aspx" scrolling="no" width="774" frameborder="0"></iframe>
</td>
</tr>
<tr>
<td>
<iframe id="BottomIframe" src="Bottom.aspx" width="100%" scrolling="no" frameborder="0"></iframe>
</td>
</tr>
</table>
</div>
</form>
</body>
页面Middle.aspx里面又包含有frameset,外面一个frameset是用来做自动高度的,里面一个是真正包含内容的
<noframes>您的浏览器不支持框架</noframes>
<frameset id="LayoutFrameset" rows="0,*" frameborder="0" framespacing="0">
<frame id="LayoutTop" src="#" noresize="noresize" />
<frameset id="pMainFrameset" frameborder="0" framespacing="0" cols="158,616">
<frame id="pleft" name="pleft" scrolling="no" noresize="noresize" src="Left.aspx?wNO=<%=WebNO()%>" />
<frame id="pmain" name="pmain" scrolling="no" noresize="noresize" src="Main.aspx?wNO=<%=WebNO()%>" allowtransparency="true" runat="server" />
</frameset>
</frameset>
在Main.aspx页面我已经搞定了高度的自动变化
<script type="text/javascript">
window.onload=function()
{
if(window.document.body.scrollHeight<680)
{
window.parent.document.all("LayoutFrameset").rows="0,680";
window.parent.parent.document.all('MiddleIframe').height=680;
}
else
{
window.parent.document.all("LayoutFrameset").rows="0,"+window.document.body.scrollHeight;
window.parent.parent.document.all('MiddleIframe').height=window.document.body.scrollHeight;
}
}
</script>
我的问题是:在Default.aspx页里面在iframe外面才可以使用滚轮控制滚动条,而鼠标移动到iframe里面的frameset里面的无论是left.aspx或者Main.aspx页的时候,不管怎么滚动滚轮,滚动条都不动,让人非常难过,一定要把鼠标移动到iframe(frameset)外面来才起作用,感觉很不爽。是否有个方法可以设置一个所谓的全局鼠标或者叫全局滚动来解决这一问题。请高人指点。
解决方案 »
- asp.net登录不了
- 关于水晶报表发布的问题~
- UpdatePanel里的<asp:TextBox />失去焦点时怎样执行某段代码?
- 检索 COM 类工厂中 CLSID 为 {000209FF-0000-0000-C000-000000000046} 的组件时失败
- 搜索中分页datagrid显示问题!
- 100分一个我认为奇怪的问题。。有谁可以帮我看看
- 正大互联团队——【视频】建立web项目(解决方案)的基本步骤。也可用于三层架构。
- web Control显示的问题
- 简单问题
- 我的新网站在大家的帮助下做好了,请大家参观批评指正:),送分
- ASP.NET怎样传参数到水晶报表里面的子报表?在线等!
- 关于RequiredFieldValidator的问题
<head>
</head>
<body>
<div id="div1" style="width:100; height:100; overflow:scroll" onscroll="funcsrcoll()">
<iframe src="tt.htm" scrolling="no"></iframe>
</div>
<div id="div2" style="width:100; height:100; overflow:scroll">
<iframe src="tt.htm" scrolling="no"></iframe>
</div>
</body>
</html>
<script language="JavaScript" type="text/JavaScript">
function funcsrcoll()
{
div2.scrollLeft = div1.scrollLeft;
div2.scrollTop = div1.scrollTop;
}
</script>