<!doctype html>body{margin:0px; } #wrap {background:black; Opacity:0.3; Filter:alpha (apacity=30); Position:absolute; left:0px; top:0px; Display:none; } #box {width:300px; height:200px; padding:10px; Background:white; border:5px Solid #333; Position:absolute; Display:none; } #close {Position:absolute; right:5px; top:5px; Text-Decoration:none; Color:black; } #close: hover {background: #333; Color:white; } </style><script type= "Text/javascript" >window.onload=function (){ varOBTN = document.getelementsbytagname (' input ') [0]; varOwrap = document.getElementById (' Wrap '); varObox = document.getElementById (' box '); varOA = document.getElementById (' Close '); Oa.onclick=function() {Owrap.style.display= ' None '; Obox.style.display= ' None '; } Obtn.onclick=function () { varscrolltop = Document.documentElement.scrollTop | |Document.body.scrollTop; varScrollLeft = Document.documentElement.scrollLeft | |Document.body.scrollLeft; Owrap.style.display= ' Block '; Owrap.style.width= Math.max (document.documentelement.clientwidth,document.body.offsetwidth) + ' px '; Owrap.style.height= Math.max (document.documentelement.clientheight,document.body.offsetheight) + ' px '; Obox.style.display= ' Block '; Obox.style.left= (document.documentelement.clientwidth-obox.offsetwidth)/2 + scrollleft + ' px '; Obox.style.top = (document.documentelement.clientheight-obox.offsetheight)/2 + scrolltop + ' px '; }; Window.onscroll=function () { if(Obox.style.display = = ' None ')return; varscrolltop = Document.documentElement.scrollTop | |Document.body.scrollTop; varScrollLeft = Document.documentElement.scrollLeft | |Document.body.scrollLeft; Obox.style.left= (document.documentelement.clientwidth-obox.offsetwidth)/2 + scrollleft + ' px '; Obox.style.top = (document.documentelement.clientheight-obox.offsetheight)/2 + scrolltop + ' px '; }; Window.onresize=function () { if(Obox.style.display = = ' None ')return; varscrolltop = Document.documentElement.scrollTop | |Document.body.scrollTop; varScrollLeft = Document.documentElement.scrollLeft | |Document.body.scrollLeft; Owrap.style.width= Math.max (document.documentelement.clientwidth,document.body.offsetwidth) + ' px '; Owrap.style.height= Math.max (document.documentelement.clientheight,document.body.offsetheight) + ' px '; Obox.style.left= (document.documentelement.clientwidth-obox.offsetwidth)/2 + scrollleft + ' px '; Obox.style.top = (document.documentelement.clientheight-obox.offsetheight)/2 + scrolltop + ' px '; };}</script>here is the landing form and so on content</div> <div></body>Dom Youku pops up