function openpopwin( url, h, w ) { document.getElementById( "popwin" ).style.display = "block"; document.getElementById( "popwinback" ).style.display = "block"; document.getElementById("popwinweb").src = url; document.getElementById( "popwin" ).style.top = ( document.documentElement.clientHeight - h ) / 2; document.getElementById( "popwin" ).style.left = ( document.documentElement.clientWidth - w ) / 2; document.getElementById( "popwin" ).style.height = h; document.getElementById( "popwin" ).style.width = w; document.getElementById("popwinweb").height = h; document.getElementById("popwinweb").width = w; document.getElementById( "popwinback" ).style.height = document.body.scrollHeight; document.getElementById( "popwinback" ).style.width = document.body.scrollWidth;
} // 关闭提示画面 function closepopwin() { document.getElementById( "popwin" ).style.display = "none"; document.getElementById( "popwinback" ).style.display = "none"; document.getElementById("popwinweb").src = "about:blank"; }
<div id="popwin" style="position: absolute; z-index: 100; display: none;"> <iframe id="popwinweb" name="popwinweb" frameborder="0"></iframe> </div> <div id="popwinback" style="position: absolute; z-index: 90; display: none; filter: Alpha(opacity=36); height: 200%; width: 100%; top: 0; left: 0; overflow: hidden;"> <iframe name="popwinbackweb" style="height: 200%; width: 200%; top: -10%; left: -10%;" οnlοad="aboutblank();"></iframe> </div>