DIV层显示登录窗口 模拟ajax窗口

function ScreenConvert() { var browser = new Browser1(); var objScreen = document.getElementById("ScreenOver"); if(!objScreen) var objScreen = document.createElement("div"); var oS = objScreen.style; objScreen.id = "ScreenOver"; oS.display = "block"; oS.top = oS.left = oS.margin = oS.padding = "0px"; if (document.body.clientHeight) { var wh = document.body.clientHeight + "px"; }else if (window.innerHeight){ var wh = window.innerHeight + "px"; }else{ var wh = document.body.scrollHeight; } oS.width = "100%"; oS.height = wh; oS.position = "absolute"; oS.zIndex = "3"; if ((!browser.isSF) && (!browser.isOP)){ oS.background = "#555"; }else{ oS.background = "#555"; } oS.filter = "alpha(opacity=65)"; oS.opacity = 60/100; oS.MozOpacity = 60/100; document.body.appendChild(objScreen); var allselect = document.getElementsByTagName("select"); for (var i=0; i= 0){ this.isOP = true;return; } s = "msie"; if ((i = ua.indexOf(s)) >= 0) { this.isIE = true; return; } s = "netscape6/"; if ((i = ua.indexOf(s)) >= 0) { this.isNS = true; return; } s = "gecko"; if ((i = ua.indexOf(s)) >= 0) { this.isNS = true; return; } s = "safari"; if ((i = ua.indexOf(s)) >= 0) { this.isSF = true; return; } s = "Firefox"; if ((i = ua.indexOf(s)) >= 0) { this.isFF = true; return; } //if (window.navigator.userAgent.indexOf("Firefox")>=1) } function PositionDiv(o,dwidth,dheight) { var wh = 0; if (document.body.clientHeight) { wh = document.body.clientHeight; }else if (window.innerHeight){ wh = window.innerHeight; }else{ wh = document.body.scrollHeight; } var screenWidth=(screen.width-dwidth)/2; var screenHeight=(screen.height-100-dheight)/2; o.style.top= screenHeight+"px"; o.style.left=screenWidth+"px"; o.style.position="absolute"; } function DivClose() { var objDialog = document.getElementById("DialogMove"); if (objDialog) objDialog.style.display = "none"; //document.getElementById('fade').style.display='none' var objScreen = document.getElementById("ScreenOver"); if (objScreen) objScreen.style.display = "none"; var allselect = document.getElementsByTagName("select"); for (var i=0; i" +"" +""+Title+"" +"" +"" +""; if(Content==null||Content=='') { ShowDiv+=""; } else { ShowDiv+=Content; } ShowDiv+=""; objDialog.innerHTML = ShowDiv; document.body.appendChild(objDialog); drag(objDialog); ScreenConvert(); PositionDiv(objDialog,dwidth,dheight); } function OpenCenterWindow(url,width,height){ window.open(url,"","height="+height+",width="+width+",left="+(window.screen.width-width)/2+",top="+(window.screen.height-height)/2+""); }

 

 

 οnclick=return div_show1()

你可能感兴趣的:(div,ajax,function,browser,null,scroll)