81,122
社区成员




<html>
<head>
<title></title>
</head>
<body>
<iframe src="test.html" height="100" width="100%" > </iframe>
<p style="height: 99999px;">test</p>
</body>
</html>
<html>
<head>
<title>子窗口</title>
<script type="text/javascript">
var tmp;
function over(){
var p=window.parent;
tmp=p.document.body.offsetWidth-p.document.body.clientWidth+6;
p.document.body.style.marginRight=tmp;
p.document.body.style.overflow='hidden';
}
function out(){
var p=window.parent;
p.document.body.style.marginRight="";
p.document.body.style.overflow='';
}
</script>
</head>
<body onmouseover="over();" onmouseout="out();">
</body>
</html>
<html>
<head>
<title></title>
</head>
<body>
<iframe src="test.html" height="100" width="100%" scrolling="no"> </iframe>
</body>
</html>
<html>
<head>
<title></title>
</head>
<body>
<iframe src="test.html" height="100" width="100%" scrolling="no" onScroll="alert('a')"> </iframe>
</body>
</html>
<html>
<head>
<title></title>
</head>
<body onScroll="document.body.scrollTop=0" >
<p style="height: 200px;">test</p>
</body>
</html>
<html>
<head>
<title></title>
<script type="text/javascript">
function scrollListener(){
demo.innerHTML="scrollListener"+new Date();
document.body.onscroll=scrollListener;
window.lastScrollIdx=document.body.scrollTop;
}
function keepScroll(){
document.body.onscroll=keepScroll;
if(window.lastScrollIdx==null)
window.lastScrollIdx=document.body.scrollTop;
demo.innerHTML="keepScroll"+new Date();
document.body.scrollTop=window.lastScrollIdx;
}
</script>
</head>
<body onscroll="scrollListener()">
<iframe src="test.html" height="300" width="100%" > </iframe>
<div style="height: 99999px;" id="demo">test</div>
</body>
</html>
<html>
<head>
<title>子窗口</title>
</head>
<body onmouseover="window.parent.keepScroll();test.innerHTML='over'" onmouseout="window.parent.scrollListener();test.innerHTML='out'">
<div id="test"></div>
</body>
</html>
<html>
<head>
<title></title>
</head>
<body>
<iframe src="test.html" height="100" width="100%" > </iframe>
<p style="height: 99999px;">test</p>
</body>
</html>
<html>
<head>
<title>子窗口</title>
</head>
<body onmouseover="window.parent.document.body.style.overflow='hidden';" onmouseout="window.parent.document.body.style.overflow='';">
</body>
</html>