日期:2014-05-16 浏览次数:20528 次
<html> <head> <script type="text/javascript"> function showS() { document.getElementById("test").scrolling="yes"; } function hideS() { document.getElementById("test").scrolling="no"; } </script> </head> <body> <div wedth:600px;height:600px" onmouseover="showS()" onmouseout="hideS()"> <iframe id="test" scrolling="no" width="600px" height="600px" frameborder="0" src="http://www.csdn.net"> </iframe> </div> </body> </html>
<html>
<head>
<script type="text/javascript">
function showS()
{
document.getElementById("test").scrolling="yes";
document.getElementById("test").style.overflow="scroll";
//alert(document.getElementById("test").scrolling);
}
function hideS()
{
document.getElementById("test").scrolling="no";
document.getElementById("test").style.overflow="hidden";
//alert(document.getElementById("test").style.overflow);
}
</script>
<style>
.ifr{width:600px;height:600px;background:#f60;overflow:hidden;display:block;position:relative;}
</style>
</head>
<body>
<div class="ifr" onMouseOut="hideS()" onMouseOver="showS()">
<iframe id="test" width="580px" height="580px" frameborder="0" src="" style="margin:10px;" > </iframe>
<script language="JavaScript">
var iframe = document.getElementById("test");
iframe.src = "http://www.ok22.org";
//以下判断iframe是否加载完,并且隐藏滚动条
if (iframe.attachEvent){
iframe.attachEvent("onload", function(){
hideS();
//document.getElementById("loading").style.display="none";
});
} else {
iframe.onload = function(){
hideS();