求一个代码方法,要详细些

来源:百度知道 编辑:UC知道 时间:2024/05/31 13:42:55
类似于百度知道里面的登陆窗口
大家可以试一下,再未登陆百度的时候,点右上角的登陆链接,会弹出一个登陆窗口,但背后的页面还在,像加了一层一样,如何实现?详细一些的,谢谢
先点击zhidao.baidu.com再点登陆的那个样式

<style type="text/css">
*{
margin:0;padding:0;
}
</style>
<script>
function sAlert(){
var eSrc=(document.all)?window.event.srcElement:arguments[1];
var shield = document.createElement("DIV");
shield.id = "shield";
shield.style.position = "absolute";
shield.style.left = "0px";
shield.style.top = "0px";
shield.style.width = "100%";
shield.style.height = ((document.documentElement.clientHeight>document.documentElement.scrollHeight)?document.documentElement.clientHeight:document.documentElement.scrollHeight)+"px";
shield.style.background = "#333";
shield.style.textAlign = "center";
shield.style.zIndex = "10000";
shield.style.filter = "alpha(opacity=0)";
shield.style.opac